CALIBRATION SYSTEM AND CALIBRATION METHOD FOR NDIR GAS SENSORS

20260056174 ยท 2026-02-26

    Inventors

    Cpc classification

    International classification

    Abstract

    The present invention relates to the technical field of sensor calibration, particularly a calibration system and a calibration method for NDIR gas sensors. The calibration system comprises: a client-server computer network with calibration software, a relay module, a gas source group, a mass flow controller, a high and low temperature chamber, a gas analyzer, and a calibration tooling rack group for implementing broadcasting-style calibration. The calibration method consists of: a Lambert-Beer weighted concentration calculation mode combined with an adaptive piecewise linear temperature compensation mode. Integrating the calibration system and the calibration method can effectively streamline the calibration process, improve the calibration accuracy, and reduce the calibration time and cost of the NDIR gas sensors. It can, therefore, conveniently realize a simultaneous calibration of many NDIR gas sensors for mass production and enable a greener production environment with a higher degree of carbon neutrality.

    Claims

    1. A calibration system for NDIR gas sensors, comprising: a client-server computer network with calibration software, a relay module, a gas source group, a mass flow controller, a high and low temperature chamber, a gas analyzer, and a calibration tooling rack group, wherein the client-server computer network is installed with calibration software (developed according to the calibration method) to control and execute broadcasting-style calibration; the calibration tooling rack group is installed in the high and low temperature chamber, and a plurality of calibration tooling plates are installed on the calibration tooling rack group; the NDIR gas sensors to be calibrated are detachably installed on the corresponding calibration tooling plates and connected with the corresponding calibration tooling plates; and a storage medium is arranged inside each NDIR gas sensor and used for storing calibration data; each gas source in the gas source group is connected with the high and low temperature chamber, respectively, through a gas path, and each gas path is provided with a pressure sensor and a solenoid valve; the relay module is connected with the pressure sensor and the solenoid valve respectively; and the mass flow controller is connected with the solenoid valve through the gas path for adjusting the size of the gas flow; the gas analyzer is connected with the high and low temperature chamber for collecting the actual gas concentration to be measured in the high and low temperature chamber; the client-server computer network with calibration software is connected with the relay module, the mass flow controller, the high and low temperature chamber, the gas analyzer, and each of the calibration tooling plates to realize control or data exchange.

    2. The calibration system for NDIR gas sensors according to claim 1, wherein a calibration tooling rack group having at least two calibration tooling racks is accommodated in the high and low temperature chamber; each of the calibration tooling racks has multiple layers; each layer is provided with at least two connector plates; each connector plate is connected through a golden finger and loaded with a plurality of calibration tooling plates; each calibration tooling plate has a plurality of installation numbers; and each of the NDIR gas sensors is installed on each of the installation numbers one by one.

    3. The calibration system for NDIR gas sensors according to claim 2, wherein a plurality of tooling power supplies are also installed on the calibration tooling racks, and each of the tooling power supplies powers the plurality of NDIR gas sensors.

    4. The calibration system for NDIR gas sensors according to claim 1, wherein the calibration system further comprises a 24 V switch power supply, and the 24 V switch power supply powers the pressure sensor, the solenoid valve, the relay module, and the mass flow controller.

    5. The calibration system for NDIR gas sensors according to claim 1, wherein the gas source group comprises a cylinder of the gas to be measured, a compressed air source, and a nitrogen cylinder.

    6. The calibration system for NDIR gas sensors according to claim 2, wherein each NDIR gas sensor comprises an optical sensing cell, an infrared light source, a detector, a bandpass amplifier, a follower, an ADC module, an MCU, and a driving unit; the optical sensing cell is provided with an air inlet and an air outlet; the infrared light source and the detector are relatively arranged in the optical sensing cell; the driving unit drives the infrared light source to emit light under the control of the MCU; and the optical sensing cell reflects the infrared light emitted by the infrared light source for entering the detector; a thermopile device and an NTC thermistor are arranged inside the detector, and two pins are led out, i.e., a thermopile pin PIN1 and an NTC thermistor pin PIN2; the thermopile PIN1 is connected with the ADC module through the bandpass amplifier, and the NTC thermistor pin PIN2 is connected with the ADC module through the follower; the MCU is connected with the ADC module for controlling the sampling of the ADC module; and the ADC module measures the peak-to-peak value of a voltage signal outputted by the bandpass amplifier as a concentration voltage V.sub.PP, and captures a voltage signal outputted by the follower as a temperature voltage V.sub.NTC; the MCU is connected with the calibration tooling plates and the client-server computer network with calibration software successively through a digital communication interface, and receives data capturing instructions, data saving instructions, and the actual gas concentration to be measured in the high and low temperature chamber, broadcasted by the client-server computer network with calibration software; the storage media are located inside the MCU, and store the concentration voltage V.sub.PP, the temperature voltage V.sub.NTC, and the actual gas concentration to be measured under the control of the MCU.

    7. A calibration method for NDIR gas sensors, which is applicable to the calibration system for the NDIR gas sensors of claim 1, comprising the following steps: determining m calibration temperature levels and n calibration concentration levels according to the working temperature and the range of the NDIR gas sensors; capturing, by the NDIR gas sensors, calibration data (x.sub.ij, y.sub.ij, z.sub.ij) at each calibration concentration level at any calibration temperature level, wherein i=1, 2, 3, . . . , m; j=1, 2, 3, 4, . . . , n; x.sub.ij is the concentration voltage V.sub.PP currently outputted by the NDIR gas sensors; z.sub.ij is the temperature voltage V.sub.NTC currently outputted by the NDIR gas sensors; and y.sub.ij is the actual gas concentration to be measured in the high and low temperature chamber collected by the gas analyzer; broadcasting and transmitting, by the client-server computer network with calibration software, the data saving instructions to each NDIR gas sensor, and saving, by the NDIR gas sensors, the calibration data to the internal storage media; extracting, by the NDIR gas sensors, (x.sub.ij, y.sub.ij) from the calibration data with the calibration temperature level of T.sub.1, wherein i=1; and j=1, 2, 3, 4, . . . , n; fitting (x.sub.ij, y.sub.ij) as a curve, denoted as y.sub.ij(x), calculating the residual sum E of squares of (x.sub.ij, y.sub.ij) according to the principle of a weighted least square curve fitting and setting a weight w.sub.ij, wherein i=1; and j=1, 2, 3, 4, . . . , n; solving fitting coefficients , , and x.sub.0 corresponding to the fitting curve y.sub.ij(x) and corresponding temperature t.sub.1; solving, by the NDIR gas sensors, fitting curves y.sub.2(x), y.sub.3(x), . . . , y.sub.m(x) and corresponding temperatures t.sub.2, t.sub.3, . . . , t.sub.m successively at the calibration temperature levels of T.sub.2, T.sub.3, . . . , T.sub.m according to the same process; dividing the temperatures t.sub.1, t.sub.2, t.sub.3, . . . , t.sub.m into m1 temperature intervals, which are: [t.sub.m, t.sub.m-1], . . . [t.sub.3, t.sub.2], [t.sub.2, t.sub.1]; acquiring current data V.sub.pp=x.sub.r and V.sub.NTC=z.sub.r by the NDIR gas sensors, and converting z.sub.r into temperature, denoted as t.sub.r, t.sub.r[t.sub.m, t.sub.1]; confirming the temperature interval where t.sub.r is located, and selecting adjacent fitting curves to calculate the gas concentration to be measured y.sub.r and the temperature compensation coefficient K.

    8. The calibration method for NDIR gas sensors according to claim 7, wherein the solving process of the fitting coefficients , , and x.sub.0 corresponding to the fitting curve y.sub.1(x) is as follows: calculating the residual sum E of squares of (x.sub.ij, y.sub.ij) according to the following formula: E = .Math. j = 1 n w ij [ y ( x ij ) - y ij ] 2 = .Math. j = 1 n w ij [ ( - ln ( x ij / x 0 ) ) 1 - y ij ] 2 according to an extremum principle, the first-order partial derivative of , , and x.sub.0 in the above formula is 0, so that the residual sum E of squares is minimum, wherein i=1; and j=1, 2, 3, 4, . . . , n; solving the fitting coefficients , , and x.sub.0 of the fitting curve y.sub.1(x) for implementing the Lambert-Beer weighted concentration calculation mode.

    9. The calibration method of the NDIR gas sensors according to claim 7, wherein the calculation of temperature t.sub.1 is as follows: at the calibration temperature level T.sub.1, calculating the average value of the temperature voltage z.sub.ij outputted by the NDIR gas sensors at each calibration concentration level, denoted as z.sub.1, z 1 _ = 1 n .Math. j = 1 n z ij , wherein i=1; and j=1, 2, 3, 4, . . . , n; converting z.sub.1 into temperature, denoted as t.sub.1.

    10. The calibration method for the NDIR gas sensors according to claim 7, wherein the Lambert-Beer weighted concentration calculation mode combined with the adaptive piecewise linear temperature compensation mode is implemented as follows: when the temperature t.sub.r[t.sub.m, t.sub.m-1], the fitting curves y.sub.m-1(x) and y.sub.m(x) are selected, x.sub.r is substituted into the curves to calculate y.sub.m-1(x.sub.r) and y.sub.m(x.sub.r), respectively, and the temperature compensation coefficient K and the gas concentration to be measured y.sub.r are calculated according to the following formulas: K = [ y m - 1 ( x r ) - y m ( x r ) ] t m - 1 - t m y r = K ( t r - t m ) + y m ( x r ) .

    Description

    DESCRIPTION OF DRAWINGS

    [0051] To more clearly describe the technical solutions in the embodiments of the present invention or in the prior art, the drawings required to be used in the description of the embodiments or the prior art will be simply presented below. Apparently, the drawings in the following description are merely the embodiments of the present invention, and for those ordinary skilled in the art, other drawings can also be obtained according to the provided drawings without contributing creative labor.

    [0052] FIG. 1 is a temperature characteristic curve of NDIR gas sensors.

    [0053] FIG. 2 is a structural schematic diagram of a calibration system of NDIR gas sensors provided by the present invention.

    [0054] FIG. 3 is a structural schematic diagram of an NDIR gas sensor provided by the present invention.

    [0055] FIG. 4 is a main flow chart of the calibration method of NDIR gas sensors provided by the present invention.

    [0056] FIG. 5 is a detailed flow chart for capturing calibration data provided by the present invention.

    [0057] FIG. 6 is a detailed flow chart for solving the Lambert-Beer curve fitting coefficients with the weighted least square curve fitting algorithm.

    [0058] FIG. 7 is a detailed flow chart for obtaining the gas concentration by a Lambert-Beer weighted concentration calculation mode combined with an adaptive piecewise linear temperature compensation mode.

    [0059] FIG. 8 is a schematic diagram of standard deviations of calibration errors of NDIR gas sensors provided by the present invention.

    [0060] FIG. 9 is a schematic diagram of fitting curves of NDIR gas sensors provided by the present invention.

    DETAILED DESCRIPTION

    [0061] The technical solutions in the embodiments of the present invention will be clearly and fully described below in combination with the drawings in the embodiments of the present invention. Apparently, the described embodiments are merely part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by those ordinary skilled in the art without contributing creative labor will belong to the protection scope of the present invention.

    [0062] As shown in FIG. 2, an embodiment of the present invention discloses a calibration system of the NDIR gas sensors, which comprises: a client-server computer network with calibration software, a relay module, a gas source group, a mass flow controller, a high and low temperature chamber, a gas analyzer, and a calibration tooling rack group. The client-server computer network is installed with calibration software (developed according to the calibration method, further elaborated upon later) to control and execute broadcasting-style calibration; the calibration tooling rack group is installed in the high and low temperature chamber, and a plurality of calibration tooling plates are installed on the calibration tooling rack group; the NDIR gas sensors to be calibrated are detachably installed on the corresponding calibration tooling plates and connected with the corresponding calibration tooling plates; and a storage medium is arranged inside each NDIR gas sensor and used for storing calibration data.

    [0063] A calibration tooling rack group having at least two calibration tooling racks is accommodated in the high and low temperature chamber; each of the calibration tooling racks has multiple layers; each layer is provided with at least two connector plates; each connector plate is connected through a golden finger and loaded with a plurality of calibration tooling plates; each calibration tooling plate has a plurality of installation numbers; and each of the NDIR gas sensors is installed on each of the installation numbers one by one.

    [0064] In the present embodiment, each calibration tooling rack has 9 layers, each layer is provided with 2 connector plates connected in series, and each connector plate is connected by the golden finger and loaded with 5 calibration tooling plates. A data link is established by the calibration tooling plates, the connector plates, and the client-server computer network with calibration software to achieve data communication between the NDIR gas sensors and the client-server computer network with calibration software finally. Each calibration tooling rack is provided with a power supply that powers each NDIR gas sensor through the connector plates.

    [0065] The client-server computer network with calibration software is connected with the relay module, the mass flow controller, the high and low temperature chamber, the gas analyzer, and each of the calibration tooling plates to realize control or data exchange.

    [0066] The gas source group comprises a cylinder of the gas to be measured, a compressed air source, and a nitrogen cylinder. Each gas cylinder and each gas source are connected with the high and low temperature chamber through a gas path, respectively, and each gas source outlet pipeline is provided with a pressure sensor and a solenoid valve. The relay module is connected with the pressure sensor and the solenoid valve, respectively. The mass flow controller is equivalent to a switch that can adjust the opening degree and is connected with the solenoid valve through the gas path to adjust the size of the gas flow. The relay module controls the solenoid valve to inject nitrogen or air into the high and low temperature chamber, thereby reducing the gas concentration to be measured in the high and low temperature chamber. At the same time, the relay module reads an input signal of the pressure sensor and feeds the signal back to the client-server computer network with calibration software so as to judge whether the gas source pressure meets the requirements.

    [0067] The gas analyzer is connected with the high and low temperature chamber for collecting the actual gas concentration to be measured in the high and low temperature chamber.

    [0068] At the same time, the calibration system of the present invention is further provided with a 24 V switch power supply, and the 24 V switch power supply powers the pressure sensor, the relay module, the solenoid valve, and the mass flow controller.

    [0069] The composition of the NDIR gas sensors is further explained below in combination with FIG. 3.

    [0070] Each NDIR gas sensor comprises an optical sensing cell, an infrared light source, a detector, a bandpass amplifier, a follower, an ADC module, an MCU, and a driving unit.

    [0071] A smooth curved mirror is arranged inside the optical sensing cell and used to reflect infrared light and accommodate the gas to be measured. A gas inlet and a gas outlet are arranged on the outer left and right ends of the optical sensing cell. The infrared light source and the detector are oppositely arranged in the optical sensing cell. In the present embodiment, the infrared light source is located on the left side of the optical sensing cell, and the MCU controls the driving unit to output a powerful PWM (Pulse Width Modulation) signal through a weak PWM signal, so that the infrared light source emits infrared light. The infrared light is reflected by the optical sensing cell and transmitted to the detector. The infrared light of a specific wavelength is partially absorbed by the gas to be measured during transmission.

    [0072] The detector is located on the right side of the optical sensing cell, and an optical filter installed on the surface of the detector allows only the infrared light of the specific wavelength to pass through. A thermopile device and an NTC thermistor are arranged inside the detector, and two pins are led out, i.e., a thermopile pin PIN1 and an NTC thermistor pin PIN2. The thermopile PIN1 is connected with the ADC module through the bandpass amplifier, and the NTC thermistor pin PIN2 is connected with the ADC module through the follower; and the MCU is electrically connected with the ADC module for controlling the sampling of the ADC module.

    [0073] The detector is sensitive to changes in the infrared light of the specific wavelength, converts the infrared light of the specific wavelength into a voltage signal through the thermopile device, and outputs the voltage signal through the PIN1. Because the voltage signal outputted by the thermopile pin is weak and close to the sawtooth shape and must be amplified and filtered, the bandpass amplifier is needed to amplify the effective signal and filter the noise to output the voltage signal close to a sine wave. Under the control of the MCU, the ADC module collects the maximum value and the minimum value of the voltage signal outputted by the bandpass amplifier to determine a peak-to-peak value. The peak-to-peak value is called the concentration voltage, denoted as V.sub.PP, and is directly proportional to the intensity of the infrared light of the specific wavelength incident on the detector. The MCU calculates the gas concentration to be measured through V.sub.PP using the specified concentration calculation mode.

    [0074] The detector, the optical sensing cell, the bandpass amplifier, and other components of the NDIR gas sensor are easily affected by the ambient temperature, resulting in an offset voltage signal. Thus, an NTC thermistor is needed so that the MCU can implement temperature compensation to offset the influence of the ambient temperature. The NTC thermistor inside the detector can convert the ambient temperature into a voltage signal and output the voltage signal through the PIN2. The voltage signal is called the temperature voltage, denoted as V.sub.NTC. Under the control of the MCU, the ADC collects temperature voltage and transmits the temperature voltage to the MCU.

    [0075] The MCU is connected with the calibration tooling plates and the client-server computer network with calibration software successively through a digital communication interface, and receives data capturing instructions, data saving instructions, and the actual gas concentration to be measured in the high and low temperature chamber, broadcasted by the client-server computer network with calibration software.

    [0076] The storage media are located inside the MCU, and store the concentration voltage V.sub.pp, the temperature voltage V.sub.NTC, and the actual gas concentration to be measured under the control of the MCU. When receiving the data capturing instructions, the MCU obtains the current concentration voltage V.sub.PP, the temperature voltage V.sub.NTC, and the actual gas concentration to be measured; and when receiving the data saving instructions, the concentration voltage V.sub.pp, the temperature voltage V.sub.NTC, and the actual gas concentration to be measured are saved to the storage media. In this way, in the actual calibration process, the NDIR gas sensors can directly retrieve the calibration data from the internal storage media, without frequent data interaction with the client-server computer network with calibration software, thereby shortening the calibration time and improving the calibration efficiency.

    [0077] As shown in FIG. 4, the embodiment of the present invention further provides a calibration method for the NDIR gas sensors. The whole process comprises three parts, i.e.:

    [0078] S1. calibration data is captured, as shown in FIG. 5, specifically comprising the following steps:

    [0079] m calibration temperature levels and n calibration concentration levels are determined, denoted as mn, according to the working temperature and the range of the NDIR gas sensors, as shown in Table 1. The calibration temperature level is denoted as T.sub.i, and the calibration concentration level is denoted as C.sub.j, wherein i and j are index numbers. i=1, 2, 3, . . . , m corresponds in turn to the calibration temperature levels T.sub.1, T.sub.2, T.sub.3 . . . , T.sub.m; j=1, 2, 3, 4, . . . , n corresponds in turn to the calibration concentration levels C.sub.1, C.sub.2, C.sub.3, C.sub.4, . . . , C.sub.n, wherein T.sub.1>T.sub.2>T.sub.3>, >T.sub.m, and C.sub.1<C.sub.2<C.sub.3<C.sub.4<, . . . , <C.sub.n.

    TABLE-US-00001 TABLE 1 m n calibration points j 1 2 3 4 . . . n Index Concentration i Temperature C.sub.1 C.sub.2 C.sub.3 C.sub.4 . . . C.sub.n 1 T.sub.1 (T.sub.1, C.sub.1) (T.sub.1, C.sub.2) (T.sub.1, C.sub.3) (T.sub.1, C.sub.4) . . . (T.sub.1, C.sub.n) 2 T.sub.2 (T.sub.2, C.sub.1) (T.sub.2, C.sub.2) (T.sub.2, C.sub.3) (T.sub.2, C.sub.4) . . . (T.sub.2, C.sub.n) 3 T.sub.3 (T.sub.3, C.sub.1) (T.sub.3, C.sub.2) (T.sub.3, C.sub.3) (T.sub.3, C.sub.4) . . . (T.sub.3, C.sub.n) . . . . . . . . . . . . . . . . . . . . . . . . m T.sub.m (T.sub.m, C.sub.1) (T.sub.m, C.sub.2) (T.sub.m, C.sub.3) (T.sub.m, C.sub.4) . . . (T.sub.m, C.sub.n)

    [0080] The calibration temperature level T.sub.1 is selected through the client-server computer network with calibration software, and the target temperature level of the high and low temperature chamber is set as T.sub.1 through the instruction. The temperature adjustment function of the high and low temperature chamber is started.

    [0081] The temperature of the high and low temperature chamber is automatically adjusted and stabilized at T.sub.1.

    [0082] The client-server computer network with calibration software selects the calibration concentration level C.sub.1.

    [0083] The client-server computer network with calibration software controls the solenoid valve to close or open the corresponding gas path through the relay module, and controls the gas flow to be measured through the mass flow controller, so as to adjust and stabilize the gas concentration to be measured in the high and low temperature chamber at C.sub.1.

    [0084] The client-server computer network with calibration software reads the current reading of the gas analyzer, denoted as y.sub.ij, wherein i=1 and j=1, which can truly reflect the gas concentration to be measured in the high and low temperature chamber.

    [0085] The client-server computer network with calibration software transmits the data-capturing instruction to the NDIR gas sensors by way of broadcasting, and the instruction contains y.sub.ij, i=1; and j=1.

    [0086] After receiving the data capturing instruction, the NDIR gas sensors capture one calibration datum (x.sub.ij, y.sub.ij, z.sub.ij), i=1; j=1; x.sub.ij is the current V.sub.pp, and z.sub.ij is the current V.sub.NTC.

    [0087] The temperature of the high and low temperature chamber remains unchanged. The same process is repeated. The NDIR gas sensors successively capture the calibration data (x.sub.ij, y.sub.ij, z.sub.ij) when the gas concentration to be measured in the high and low temperature chamber is stabilized at C.sub.2, C.sub.3, C.sub.4, . . . , C.sub.n, wherein i=1; and j=2, 3, 4, . . . , n. Then, the calibration data (x.sub.ij, y.sub.ij, z.sub.ij) when the calibration temperature level is T.sub.1 has been successfully captured, wherein i=1; and j=12, 3, 4, . . . , n.

    [0088] The same process is repeated. The NDIR gas sensors successively capture the calibration data (x.sub.ij, y.sub.ij, z.sub.ij) when the temperature of the high and low temperature chamber is stabilized at T.sub.2, T.sub.3, . . . , T.sub.m, wherein i=2, 3, . . . , m; and j=1, 2, 3, 4, . . . , n.

    [0089] Then, the calibration data (x.sub.ij, y.sub.ij, z.sub.ij) corresponding to all the calibration points has been successfully captured, wherein i=1 2, 3, . . . , m; and j=1, 2, 3, 4, . . . , n.

    [0090] The client-server computer network with calibration software broadcasts and transmits the data-saving instructions to the NDIR gas sensors.

    [0091] After receiving the data saving instruction, the NDIR gas sensors save the calibration data (x.sub.ij, y.sub.ij, z.sub.ij) to the internal storage medium, i=1 2, 3, . . . , m; and j=1, 2, 3, 4, . . . , n. Then, the process of capturing the calibration data is complete.

    [0092] S2. fitting curves are solved by weighted least squire curve fitting, as shown in FIG. 6:

    [0093] The formula of the Lambert-Beer fitting curve is shown in formula (1):

    [00004] I = I 0 .Math. e - C ( 1 )

    [0094] In formula (1), I represents the transmitted light intensity (in W/m.sup.2) of the light after passing through the gas to be measured; I.sub.0 represents the incident light intensity (that is, the initial signal intensity when the gas concentration to be measured is 0, in W/m.sup.2); C is the gas concentration to be measured; a represents the comprehensive absorption coefficient of the gas to be measured in a specific band; and is a correction factor that depends on the optical structure and the characteristics of the optical filter.

    [0095] Formula (1) is derived to obtain the expression of the gas concentration to be measured C, as shown in formula (2).

    [00005] C = [ - ln ( I / I 0 ) ] 1 ( 2 )

    [0096] I and I.sub.0 are replaced with x and x.sub.0, respectively, as shown in formula (3).

    [00006] I I 0 = x x 0 ( 3 )

    [0097] In formula (3), x is V.sub.PP corresponding to the emergent light intensity I, and x.sub.0 is V.sub.PP corresponding to the incident light intensity I.sub.0.

    [0098] By combining formula (1), formula (2), and formula (3), the gas concentration to be measured C is expressed by y(x), and the expression after Lambert-Beer transformation is obtained, as shown in formula (4).

    [00007] y ( x ) = [ - ln ( x / x 0 ) ] 1 ( 4 )

    [0099] Next, the process of solving m-fitting curves of formula (4) by the weighted least square curve fitting is introduced.

    [0100] The NDIR gas sensors load the calibration data (x.sub.ij, y.sub.ij, z.sub.ij) from the internal storage media, wherein i=1 2, 3, . . . , m; and j=1, 2, 3, 4, . . . , n.

    [0101] The NDIR gas sensors extract (x.sub.ij, y.sub.ij) from the calibration data at the calibration temperature level of T.sub.1, wherein i=1; and j=1, 2, 3, 4, . . . , n.

    [0102] The NDIR gas sensors fit (x.sub.ij, y.sub.ij) as a curve of formula (4), denoted as y.sub.1(x), wherein i=1; and j=1, 2, 3, 4, . . . , n.

    [0103] The NDIR gas sensors calculate the residual sum E of squares of (x.sub.ij, y.sub.ij) according to the principle of a weighted least square curve fitting and set a weight w.sub.ij, wherein i=1; and j=1, 2, 3, 4, . . . , n. The weight w.sub.ij is set according to the gas concentration to be measured, that is, w.sub.ij=1/y.sub.ij.sup.2. When w.sub.ij=1, no weight is set. When w.sub.ij=1/y.sub.ij.sup.2, the weight is related to the gas concentration to be measured. The lower the gas concentration to be measured, the greater the weight.

    [0104] According to an extremum principle, the first-order partial derivative of , , and x.sub.0 in the above formula is 0, so that the residual sum E of squares is minimum.

    [0105] The NDIR gas sensors solve the fitting coefficients , , and x.sub.0 corresponding to the fitting curve y.sub.1(x).

    [0106] The NDIR gas sensors calculate the average value of z.sub.ij, denoted as z.sub.1, wherein i=1; and j=1, 2, 3, 4, . . . n.

    [0107] The NDIR gas sensors convert z.sub.1 to temperature, denoted as t.sub.1, in C.

    [0108] According to the same process, the NDIR gas sensors solve and calculate the fitting curves y.sub.2(x), y.sub.3(x), . . . , y.sub.m(x) and the corresponding temperatures t.sub.2, t.sub.3, . . . , t.sub.m successively when the calibration temperature levels are T.sub.2, T.sub.3, . . . , T.sub.m.

    [0109] Then, m fitting curves y.sub.1(x), y.sub.2(x), y.sub.3(x), . . . , y.sub.m(x) and the corresponding temperatures t.sub.1, t.sub.2, t.sub.3, . . . , t.sub.m have been successfully solved, wherein t.sub.1>t.sub.2>t.sub.3>, . . . , >t.sub.m. They will be used for implementing the concentration calculation mode and the temperature compensation mode in the next process

    [0110] S3. The Lambert-Beer weighted concentration calculation mode combined with the adaptive piecewise linear temperature compensation mode, as shown in FIG. 7:

    [0111] t.sub.1, t.sub.2, t.sub.3, . . . , t.sub.m are divided into m1 temperature intervals, which are: [t.sub.m, t.sub.m-1], . . . , [t.sub.3, t.sub.2], [t.sub.2, t.sub.1].

    [0112] To calculate the gas concentration to be measured (denoted as y.sub.r), the NDIR gas sensors obtain the current data V.sub.PP=x.sub.r and V.sub.NTC=z.sub.r.

    [0113] z.sub.r is converted to temperature, denoted as t.sub.r, in C., and t.sub.r[t.sub.m, t.sub.1].

    [0114] The temperature interval where t.sub.r is located is confirmed, and adjacent fitting curves are selected to calculate the gas concentration to be measured as follows:

    [0115] When t.sub.r[t.sub.m, t.sub.m-1], the fitting curves y.sub.m-1(x) and y.sub.m(x) are selected, x.sub.r is substituted into the curves to calculate y.sub.m-1(x.sub.r) and y.sub.m(x.sub.r), respectively, and the temperature compensation coefficient K and the concentration Y.sub.r are calculated by formula (5) and formula (6):

    [00008] K = [ y m - 1 ( x r ) - y m ( x r ) ] t m - 1 - t m ( 5 ) y r = K ( t r - t m ) + y m ( x r ) ( 6 )

    [0116] When t.sub.r[t.sub.3, t.sub.2], the fitting curves y.sub.2(x) and y.sub.3(x) are selected, and K and y.sub.r are calculated by formula (7) and formula (8):

    [00009] K = [ y 2 ( x r ) - y 3 ( x r ) ] t 2 - t 3 ( 7 ) y r = K ( t r - t 3 ) + y 3 ( x r ) ( 8 )

    [0117] When t.sub.r[t.sub.2, t.sub.1], the fitting curves y.sub.1(x) and y.sub.2(x) are selected, and K and y.sub.r are calculated by formula (9) and formula (10):

    [00010] K = [ y 2 ( x r ) - y 3 ( x r ) ] t 1 - t 2 ( 9 ) y r = K ( t r - t 2 ) + y 2 ( x r ) ( 10 )

    [0118] Then, the process of concentration calculation and temperature compensation is complete.

    [0119] As shown in FIG. 8, in order to further illustrate the accuracy of the calibration method of the present invention, when the calibration points are reduced appropriately, the calibration data (x.sub.ij, y.sub.ij, z.sub.ij) are obtained from the production data of 1,000 NDIR CO.sub.2 (carbon dioxide) gas sensors. Then, the measurement results are calculated in combination with the calibration method of the present invention. Finally, taking the calibration concentration level C.sub.j as a reference, the standard deviation (denoted as .sub.err) of the calibration error of the measurement results is calculated to represent the accuracy of the NDIR CO.sub.2 gas sensors. When there are 4 calibration temperature levels and 6 calibration concentration levels (denoted as 46, the same as below), it takes 16 hours to calibrate a batch of products. Then, the calibration error of the measurement results conforms to the specification. Accordingly, when the calibration points are reduced to 43 and 33, the calibration error of the measurement results still conforms to the specification: 3.sub.err(C.sub.j5%+50) ppm. After the calibration points are reduced to 43 and 33, it takes only 14 hours and 10.5 hours to calibrate a batch of products, which means that the calibration efficiency is significantly improved.

    [0120] In addition, when 46 calibration points are used, .sub.err is 3.01 and 1.13 at w.sub.ij=1 and w.sub.ij=1/y.sub.ij.sup.2; and when 43 calibration points are used, .sub.err is 1.01 and 0.65 at w.sub.ij=1 and w.sub.ij=1/y.sub.ij.sup.2, thereby indicating that a higher weight within the low concentration range effectively improves the accuracy of the NDIR CO.sub.2 gas sensors within the low concentration range. It can be seen that compared with the conventional Lambert-Beer fitting, the calibration method of the present invention further improves the accuracy of the NDIR gas sensors within the low concentration range.

    [0121] Because the calibration method of the NDIR gas sensors (such as NDIR CO gas sensors, NDIR CH.sub.4 gas sensors, and NDIR CO.sub.2 gas sensors) are the same, the present invention takes the NDIR CO.sub.2 gas sensors and the 46 calibration points as an example to explain the above calibration method in detail. [0122] S101. according to the operating temperature and the range, 46 calibration points are determined, and the corresponding index numbers i,j are set, as shown in Table 2. [0123] S102. the client-server computer network with calibration software selects the calibration temperature level of 50 C. [0124] S103. the client-server computer network with calibration software sets the target temperature level of the high and low temperature chamber to 50 C. and starts the temperature adjustment function of the high and low temperature chamber through instructions. [0125] S104. the temperature of the high and low temperature chamber is automatically adjusted and stabilized at 50 C. [0126] S105. the client-server computer network with calibration software selects the calibration concentration level of 400 ppm.

    TABLE-US-00002 TABLE 2 4 6 calibration points j 1 2 3 4 5 6 Index Temperature Concentration (ppm) i ( C.) 400 800 1400 2200 3300 5000 1 50 (50, 400) (50, 800) (50, 1400) (50, 2200) (50, 3300) (50, 5000) 2 25 (25, 400) (25, 800) (25, 1400) (25, 2200) (25, 3300) (25, 5000) 3 5 (5, 400) (5, 800) (5, 1400) (5, 2200) (5, 3300) (5, 5000) 4 10 (10, 400) (10, 800) (10, 1400) (10, 2200) (10, 3300) (10, 5000) [0127] S106. the client-server computer network with calibration software controls the solenoid valve to close or open the corresponding gas path through the relay module, and controls the flow of the CO.sub.2 gas through the mass flow controller, so as to adjust and stabilize the CO.sub.2 gas concentration in the high and low temperature chamber at 400 ppm. [0128] S107. the client-server computer network with calibration software reads the current reading of the gas analyzer, denoted as y.sub.ij, wherein i=1 and j=1, which can truly reflect the CO.sub.2 gas concentration in the high and low temperature chamber. [0129] S108. the client-server computer network with calibration software transmits the data-capturing instruction to the NDIR CO.sub.2 gas sensors by way of broadcasting, and the instruction contains y.sub.ij=1; and j=1. [0130] S109. after receiving the data capturing instruction, the NDIR CO.sub.2 gas sensors capture one calibration datum (x.sub.ij, y.sub.ij, z.sub.ij), i=1; j=1; x.sub.11 is the current V.sub.PP, and z.sub.ij is the current V.sub.NTC.

    [0131] S110. the temperature of the high and low temperature chamber remains unchanged. The same process as S105 to S109 is repeated. The NDIR CO.sub.2 gas sensors successively capture the calibration data (x.sub.ij, y.sub.ij, z.sub.ij) when the CO.sub.2 gas concentration in the high and low temperature chamber is stabilized at 800 ppm, 1400 ppm, 2200 ppm, 3300 ppm, and 5000 ppm, wherein i=1; and j=2, 3, 4, 5, 6.

    [0132] S111. then, the calibration data (x.sub.ij, y.sub.ij, z.sub.ij) when the calibration temperature level is 50 C. has been successfully captured, wherein i=1; and j=1 2, 3, 4, 5, 6.

    [0133] S112. the same process as S102 to S110 is repeated; and the NDIR CO.sub.2 gas sensors successively capture the calibration data (x.sub.ij, y.sub.ij, z.sub.ij) when the temperature of the high and low temperature chamber is stabilized at 25 C., 5 C., and 10 C., wherein i=2, 3, 4; and j=1 2, 3, 4, 5, 6.

    [0134] Then, the calibration data (x.sub.ij, y.sub.ij, z.sub.ij) corresponding to all the calibration points has been successfully captured, wherein i=1 2, 3, 4; and j=1, 2, 3, 4, 5, 6. [0135] S113. the client-server computer network with calibration software broadcasts and transmits the data-saving instructions to the NDIR CO.sub.2 gas sensors. [0136] S114. after receiving the data saving instruction, the NDIR CO.sub.2 gas sensors save the calibration data (x.sub.ij, y.sub.ij, z.sub.ij) to the internal storage medium, i=1, 2, 3, 4; and j=1, 2, 3, 4, 5, 6. [0137] S115. The NDIR CO.sub.2 gas sensors load the calibration data (x.sub.ij, y.sub.ij, z.sub.ij) from the internal storage media, wherein i=1, 2, 3, 4; and j=1 2, 3, 4, 5, 6. [0138] S201. the NDIR CO.sub.2 gas sensors extract (x.sub.ij, y.sub.ij) from the calibration data at the calibration temperature level of 50 C., wherein i=1; and j=1, 2, 3, 4, 5, 6. [0139] S202. the NDIR CO.sub.2 gas sensors fit (x.sub.ij, y.sub.ij) as a curve of formula (4), denoted as y.sub.ij(x), wherein i=1; and j=1, 2, 3, 4, 5, 6. [0140] S203. the NDIR CO.sub.2 gas sensors calculate the residual sum E of squares of (x.sub.ij, y.sub.ij) according to the principle of a weighted least square curve fitting and set a weight w.sub.ij, wherein i=1; and j=1, 2, 3, 4, 5, 6, as shown in formula (11).

    [00011] E = .Math. j = 1 6 w ij [ y ( x ij ) - y ij ] 2 = .Math. j = 1 6 w ij [ ( - ln ( x ij / x 0 ) ) 1 - y ij ] 2 ( 11 ) [0141] S204. according to an extremum principle, the first-order partial derivative of , , and x.sub.0 in the formula (11) shall be 0 in order to make the residual sum E of squares minimum, wherein i=1; and j=1, 2, 3, 4, 5, 6, as shown in formula (12), formula (13), and formula (14).

    [00012] E a = - 2 .Math. j = 1 6 w ij [ [ ln ( x ij / x 0 ) ] 2 2 + ] 1 + 2 .Math. j = 1 6 w ij y ij [ - ln ( x ij / x 0 ) 1 + ] 1 = 0 ( 12 ) E = - 2 2 .Math. j = 1 6 w ij [ - ln ( x ij / x 0 ) ] 2 * ln [ - ln ( x ij / x 0 ) ] + 2 2 .Math. j = 1 6 w ij y ij [ - ln ( x ij / x 0 ) ] 1 * ln [ - ln ( x ij / x 0 ) ] = 0 ( 13 ) E x 0 = - 2 x 0 .Math. j = 1 6 w ij [ - ln ( x ij / x 0 ) ] 2 - + 2 x 0 .Math. j = 1 6 w ij y ij [ - ln ( x ij / x 0 ) ] 1 - = 0 ( 14 ) [0142] S205. formula (12), formula (13), and formula (14) are simplified to obtain formula (15), formula (16), and formula (17), wherein i=1; and j=1, 2, 3, 4, 5, 6.

    [00013] .Math. j = 1 6 w ij [ - ln ( x ij / x 0 ) ] 2 = 1 .Math. j = 1 6 w ij y ij [ - ln ( x ij / x 0 ) ] 1 ( 15 ) .Math. j = 1 6 w ij [ - ln ( x ij / x 0 ) ] 2 * ln [ - ln ( x ij / x 0 ) ] = .Math. j = 1 6 w ij y ij [ - ln ( x ij / x 0 ) ] 1 * ln [ - ln ( x ij / x 0 ) ] ( 16 ) .Math. j = 1 6 w ij [ - ln ( x ij / x 0 ) ] 2 - = 1 .Math. j = 1 6 w ij y ij [ - ln ( x ij / x 0 ) ] 1 - ( 17 ) [0143] S206. the NDIR CO.sub.2 gas sensors solve the fitting coefficients , , and x.sub.0 of the fitting curve y.sub.1(x) by formula (15), formula (16), and formula (17). [0144] S207. the NDIR CO.sub.2 gas sensors calculate the average value of z.sub.ij, denoted as z.sub.1, wherein i=1; and j=1, 2, 3, 4, 5, 6, as shown in formula (18).

    [00014] z 1 _ = 1 6 .Math. j = 1 6 z ij ( 18 ) [0145] S208. the NDIR CO.sub.2 gas sensors convert zi to temperature, denoted as t.sub.1, in C. [0146] S209. the same process as S201 to S208 is repeated, and the NDIR CO.sub.2 gas sensors solve and calculate the fitting curves y.sub.2(x), y.sub.3(x), and y.sub.4(x) and the corresponding temperatures t.sub.2, t.sub.3, and t.sub.4 successively when the calibration temperature levels are 25 C., 5 C., and 10 C. The relationship among t.sub.1, t.sub.2, t.sub.3, and t.sub.4 is: t.sub.1>t.sub.2>.sub.3>t.sub.4.

    [0147] Then, four fitting curves y.sub.1(x), y.sub.2(x), y.sub.3(x), and y.sub.4(x) and the corresponding temperatures t.sub.1, t.sub.2, t.sub.3, and t.sub.4 have been successfully solved, wherein t.sub.1>t.sub.2>t.sub.3>t.sub.4.

    [0148] As shown in FIG. 9, with V.sub.pp as the x-axis and concentration as the y-axis, the four fitted curves y.sub.1(x), y.sub.2(x), y.sub.3(x), and y.sub.4(x) correspond to 50 C., 25 C., 5 C., and 10 C., respectively. Note: This step begins to illustrate how to obtain the value of the CO.sub.2 gas concentration to be measured by this algorithm according to the measured V.sub.PP and V.sub.NTC. [0149] S301. 50 C., 25 C., 5 C., and 10 C. are divided into three temperature intervals [10, 5], [5, 25], and [25, 50]. [0150] S302. the NDIR CO.sub.2 gas sensors obtain real-time data V.sub.PP=0.92 V and V.sub.NTC=0.3 V. [0151] S303. the NDIR gas sensors convert V.sub.NTC=0.3 V into temperature to obtain 42.9 C., which falls in the temperature interval [25 C., 50 C.] and is represented by point A in FIG. 9. Then, the CO.sub.2 gas concentration to be measured y.sub.A is calculated by formula (19):

    [00015] y A = [ y 1 ( 0.92 ) - y 2 ( 0 . 9 2 ) ] ( 4 2 . 9 - 2 5 ) 5 0 - 2 5 + y 2 ( 0.92 ) ( 19 )

    [0152] Each embodiment in the description is described in a progressive way. The difference between each embodiment and the others is the focus of the explanation. The same and similar parts among all the embodiments can be referred to each other. For a device disclosed by the embodiments, because the device corresponds to a method disclosed by the embodiments, the device is simply described. Refer to the description of the method part for the related part.

    [0153] The above description of the disclosed embodiments enables those skilled in the art to realize or use the present invention. Many modifications to these embodiments will be apparent to those skilled in the art. The general principle defined herein can be realized in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to these embodiments shown herein, but will conform to the widest scope consistent with the principle and novel features disclosed herein.