1. Introduction
Continuous development and improvement of non-dispersive infrared (NDIR) gas sensors has allowed them to reach very high resolution, ppm and sub-ppm, in relatively low-cost designs. With high mechanical accuracy of the optical system, temperature-controlled optics, highly stable electronics, and optimized mirror surfaces, a detection level as low as 0.007 ppm can be achieved [
1].
The theoretical principle of NDIR sensors, as described by the Lambert–Beer law [
2], is the dependence between the transmittance of light and the number of gas molecules capable of absorbing the light. The total number of molecules involved in the light absorption depends on the volumetric concentration and the ambient pressure in sensed volume. This means that even small changes in the ambient pressure can easily result in measurement errors exceeding the required accuracy specified for the application.
Hence, for demanding applications, such as environmental and atmospheric research [
3], there is a need for a reliable solution that can compensate for the influence of the ambient pressure variations. Significant improvements in the measurement performance can be attained by implementation of an accurate pressure compensation procedure.
To our knowledge, only a few research studies have been published on the topic of the implementation of an accurate pressure compensation procedure in NDIR applications. However, in [
4], Robert Frodl et.al presented a spectroscopic gas sensor system for measurement of carbon dioxide. They briefly discussed the compensation of atmospheric pressure variations utilizing a piezoresistive pressure sensor, but without presenting details of the method. In addition, pressure compensation in a NDIR sensor has also been studied in [
5,
6,
7] without any details regarding the method of choice.
References [
8,
9,
10] discuss the pressure compensation approaches, which are usually applied during post-processing of measured results. These are mostly based on a simple linear regression recalculation method.
Some information about linear compensation coefficients can be found in manuals and application notes from NDIR sensor manufacturers [
11,
12].
One of the most advanced approaches, which consider the concentration dependence of the compensation parameters, can be found in [
13]. However, this compensation algorithm uses theoretical parameters derived from spectral simulation. This also means that variations found in real sensor system are neglected in the compensation parameters.
In general, the most common pressure compensation algorithms, which are based on calculation of compensation parameters, are obtained at reference concentrations similar to the application. This approach, considered as a one-dimensional compensation method, has the ability to compensate for varying pressure close to the reference concentration. However, in reality, compensation parameters obtained at equal pressure values can vary significantly for different concentrations. This means, that the use of compensation parameters obtained in one specific reference concentration can lead to significant compensation errors for other concentrations. One way of handling the concentration dependence, is to determine the compensation parameters at many reference concentrations. Unfortunately, this will require a complicated calibration procedure, which involves a large number of reference gases. It will also require a large number of compensation parameters being stored to cover the whole concentration range in the intended application.
In this paper, we present an advance compensation algorithm, which offers a practical solution based on empirical results obtained in precisely controlled conditions. It allows for the implementation of a pressure compensation, which is individual and includes all possible uncertainties found in a specific sensor. The presented result shows that the algorithm is valid over a relatively broad concentration range, and sets minimum memory and computational requirements for the sensor system.
2. Motivation for Calibration-Based Compensation
As mentioned in the introduction, the transmittance of specific wavelength of light traveling through a volume of gas is described by the Lambert–Beer law [
2,
14] and shown in
Figure 1:
For an ideal gas at pressure
P and temperature
T, the mixing ratio
q, corresponding to the volumetric or fractional concentration, expressed in parts per million (ppm) equals [
14]:
where
τ is the radiation transmittance,
k is the Boltzmann constant,
x optic path length. The spectral dependence is contained in the absorption cross section,
σϑ (area/molecule).
As seen, in Equation (1) there is a direct dependence between concentration, gas pressure P, and transmittance. Two parameters in this equation contains a pressure-variation dependency, which have an impact on the concentration reported by the sensor:
The gas pressure P, which affects the density of light absorbing molecules in the optical path;
The absorption cross section σϑ, which represents the spectral absorptivity of a specific gas, summed from the absorption peaks of the gas molecules.
It may be perceived as fairly simple to use Equation (1) as a theoretical model for pressure compensation, if the sensor continuously measures the pressure and have access to stored data regarding the absorption cross section (available from [
15]).
Unfortunately, in a practical implementation with a large number of individual sensors and the need of high accuracy, there are several other factors that complicate theoretical modelling.
The variation of the number of molecules in the optic path, due to variation in pressure, has a direct impact and is used for simple modelling. Application notes and recommendation found in [
11,
12], propose approaches for the compensation of the influence of pressure on the density of absorbing molecules. These are based on a simple linear dependence between variation of pressure and the sensors reported concentration. They can provide compensation for this type of impact within a limited concentration range close to reference concentration conditions. For the most common sensors and applications, with tolerances of ±30 ppm and ±3% of sensors reading [
16], this can be satisfactory. However, tougher demands regarding accuracy in gas concentration measurements, necessitate development of improved methods which include all pressure-dependent aspects. This includes handling of the effect of the variation in absorption cross section
σϑ, caused by variation in pressure.
Figure 2 presents the simulation results of absorption cross sections,
σϑ [
15], for an environment with stable CO
2 concentration and temperature, for two different values of pressure. As can be seen, there is a clear difference in the resultant absorption cross section due to the variation of pressure. According to Equation (1), a decrease in the absorption cross section results in an increase in the concentration reported by the sensor. This means that pressure variation in the sensing environment affects the optical transmission in two ways:
Quantitatively, as a change in the number of absorbing molecules in the measured volume (sensor cavity);
Qualitatively, as changes in the molecules’ absorbing capacity.
Hence, even for ideal conditions theoretical modelling of the variations in absorptivity caused by the variations in pressure is complicated. In addition, a practical system implementation will result in physical uncertainties and variations which are also difficult to model theoretically and to compensate for. These include:
The variation in optic filter passbands, due to individual variations;
The wide range of angle of incidence (AOI) for light beams crossing optic filters.
Figure 2 presents a transmission simulation for light with AOI = 0 degrees.
In a calibration-based compensation procedure, which is an empirical method, all deviations are taken into consideration by collecting calibration data in the reference conditions. For large-scale production of devices with limited computational and storage resources, the calibration approach utilized in the presented work, is the preferable method.
3. General One-Dimensional Pressure Compensation Method
3.1. Definitions
To present the general method for pressure compensation of a NDIR sensor, some definitions must be introduced:
qmeas is the concentration value directly reported by the sensors without applied pressure compensation. Errors caused by pressure variations in the environment are included in qmeas;
qP0 is the concentration value reported by sensor under the standard pressure conditions P0 = 1.013 Bar, all non-pressure-dependent measurement errors are herein considered negligible;
qref is the reference concentration;
qcomp is the concentration value calculated from qmeas by the pressure compensation method.
In ideal conditions, qP0 should equal to qref. In reality, the sensors could show deviations within specified tolerances. Hence, the value of qcomp should be targeted to be equal to the sensor’s own reading in standard pressure condition qP0.
3.2. Derivation of Compensation Coefficients
Equation (2) presents the compensated concentration for measurements performed at a pressure
P ≠
P0:
where
K is the pressure compensation factor at a specific pressure, obtained through calibration.
The general pressure compensation method, which is widely used [
11,
12], requires the compensation factor value
K to be obtained as a function within the working pressure range of the sensor.
K is derived from a limited number of measurements done on certain pressure points to be obtained. Since
K is a function, this allows the compensation factor for pressure points even between the actual measuring points.
Pressure calibration procedure is performed in a pressure variable environment with stable concentration and temperature conditions. Pressure calibration equipment provides a set of environments with resolution 100 mBar. On each pressure step
qmeas is obtained and the respective compensation factor is calculated:
The curve fitting for calibration data points give a polynomial equation for compensation factor function:
A second-order polynomial is motivated by the fact that a linear dependence gives an error in the linear fit (square sum) within 0.2 to 1.0%, whereas a second-order polynomic results in an error below 0.04%. Increasing the polynomial to third order only provides an additional accuracy of 0.01%. This could be considered as negligible and requires greater computational demands. A and B are single polynomial coefficients, which are stored in the sensor’s microprocessor memory.
Figure 3 presents a calibration performed in a CO
2 environment equal to
qref = 400 ppm to obtain the pressure dependence of the compensation factor
K.
The data collected and calculated in the calibration points give the compensation factor
K vs. delta pressure (
P – P0). This could be described by polynomial Equation (4), which from
Figure 3 results in:
Table 1 contains the verification results for two arbitrary pressure values taken in the reference environment; here
∆ is deviation of compensated value
qcomp from
qP0.
Compensated concentration values obtained for pressure points, which are between calibration points give accurate results within a sensor’s specified tolerances [
16].
3.3. Concentration Dependence of the Compensation Factor
The general pressure compensation method could be considered as a one-dimensional method, which allows for efficient and accurate compensation along pressure variation at one specific concentration.
Figure 4a shows an example of how the compensation factors for varying pressures, calculated using Equation (4), differ depending on the CO
2 concentration. The magnification in
Figure 4b clearly shows how the compensation factor for a specific pressure varies (red dots) with the concentration.
Figure 5 presents the values for the compensation factor as 3D surface in the investigated pressure and concentration range. Each reference concentration for a certain pressure level is matched with a set of
K values (red dots).
The variation in the compensation factor at the same pressure level, will introduce errors in the compensated value unless qmeas is close to the reference value where the factor was derived.
To improve the accuracy of the pressure compensation at any point in the pressure-concentration space, it is therefore important also to consider the concentration dependence.
Thus, to resolve the impact from concentration dependence requires interpolation in a second dimension.
4. Experimental
A calibration procedure always requires the use of initial data, which were collected against reference values. In the case of pressure calibration, this requires stable pressure and concentration conditions.
The one-dimensional compensation method uses initial data collected in one reference concentration near to the application range. The introduced two-dimensional algorithm requires at least two reference concentrations. The use of additional reference concentrations provides better performance but also requires more computational and memory capacity in sensor design.
The concentration range and the number of reference concentrations, used in the pressure calibration procedure, is determined by the field of application. Usually, in the calibration, the concentration range should be wider than the required application range. For environmental monitoring and indoor ventilation applications [
17,
18], a calibration range between 200 and 5000 ppm CO
2 (under standard pressure
P0 = 1.013 Bar) is considered as sufficient since the normal working range is expected to be between 400 and 3000 ppm.
For each reference concentration, the test system provides a stepped pressure variation inside the test volume within 0.5–1.1 Bar. This range corresponds to the pressures where human activity on earth is most common. Pressure P0 = 1.013 Bar is the standard value at sea level. For experimental purposes and for future interpolation validation, the pressure variation is conducted in small steps (10–50 mBar depending on the specific range). When the pressure is closer to standard pressure, a smaller step is applied.
The calibration system, presented in
Figure 6, consists of a calibration chamber with pneumatic components, which supply reference gas and pressure stabilization at the respective pressure point during whole calibration procedure. The overall system is controlled by a LabVIEW-based software, which collects and logs calibration data for the subsequent calculation of the compensation parameters. A more detailed description of the system is presented in [
14].
To evaluate the pressure compensation procedure, a calibration was performed based on six reference gases (200, 500, 800, 1600, 3000, and 5000 ppm CO
2).
Figure 7 presents the obtained data in four concentrations—200, 500, 1600, and 5000 ppm CO
2, used for pressure calibration calculations. The data retrieved from reference concentration 800 and 3000 ppm was used for verification of the compensation procedures.
One pressure point from each of the reference concentrations 800 and 3000 ppm was selected and later used as a verification point.
Table 2 presents the complete data for the verification points. In
Table 2, the measured concentration by the sensor,
qmeas, at the verification point is named
Q_ver.
5. Implementation and Verification of the Two-Dimensional Compensation Algorithm
As presented in
Section 3.3, the pressure compensation factor has a concentration dependence. Thus, the pressure compensation algorithm should have the capability to derive the compensation factor at any point in the pressure–concentration space.
The developed pressure compensation algorithm operates using the concentration value qmeas reported by NDIR sensor, the ambient pressure value P (obtained from either an internal pressure sensor or from external sources), and the individual calibration parameters derived in production calibration.
The calibration procedure provides data obtained in several reference environments with variable pressure. The compensation factor, as a set of functions
K vs. (
P − P0), was calculated using Equation (3) for all reference concentrations.
Figure 8 presents the dependences and their polynomial equations:
The polynomial coefficients in Equation (4) from the four references concentrations are summarized in
Table 3:
Based on the verification parameters in
Table 2, an implementation of the compensation algorithm could be evaluated and the compensation tolerance could be estimated.
The first interpolation step is performed along the pressure variation. The goal is to derive a compensation factor at each reference concentrations for the pressure P_ver = 0.72 Bar. Interpolative calculations also give the compensation factor between the pressure calibration points.
In the next step, the intermediate concentration
qn_norm_p is introduced and calculated using previously obtained compensation factors:
Here qn_norm_p is the normalized value of qP0 at a pressure value P for the reference condition n. Basically qn_norm_p is the concentration expected for the respective reference gas n at a pressure value P. The space between qn_norm_p contains all possible qmeas values at the same pressure P.
Table 4 presents the compensation factors and respective expected concentrations
qn_norm_p for the four reference dependences
K_n.
Figure 9 presents the relationship between the compensation parameters and the concentration values.
In the second step of the algorithm, the dependence between
K_n vs.
qn_norm_p, plotted in
Figure 10, is used for interpolation in the second dimension and calculation of the compensation factor for
qmeas_ver:
The obtained dependence formula is:
Since the reported values
qmeas and
qn_norm_p belong to the same concentration space, the calculation of
K_n is performed through:
Respectively,
qmeas_ver = 480 ppm in (8) gives the compensation factor
K_ver = 0.62. Now, by using (2), it is possible to calculate compensated value for
qmeas_ver = 480 ppm. Similar calculations were performed for an additional verification point
qmeas_ver = 1106 ppm CO
2 and
P_ver = 0.55 Bar and plotted in
Figure 11:
Table 5 summarizes all calculated parameters for both verification concentrations from
Table 2.
6. Results and Discussion
In order to estimate the achieved improvement by adding a second interpolation dimension in the compensation algorithm, an error estimation was performed for two similar measurement conditions.
For HVAC (heating, ventilation, and air conditioning) or indoor air quality management applications, with a working range between 400 ppm and 3000 ppm, pressure calibration is normally performed at 1600 ppm. It is in the middle of the range and therefore a commonly occurring value.
The compensated concentration values
qcomp, was calculated for the two verification concentrations (800 ppm and 3000 ppm) using both the one-dimensional method (based on a compensation factor obtained at 1600 ppm) and the presented two-dimensional algorithm. The resulting values and errors relative to
qP0 are presented in
Table 6.
The results presented in
Table 6 clearly show a much higher accuracy for the two-dimensional pressure compensation algorithm compared to the general one-dimensional algorithm.
However, for the two-dimensional algorithm there is a significant difference in compensation error for the two verification points 480 ppm and 1096 ppm. The explanation can be found in
Figure 10 and
Figure 11 for the verification points respectively. The first point
Q_ver = 480 lays in range where the steps in the calibration concentrations are significantly shorter than for
Q_ver = 1096. Additionally, the dependence in transient compensation factors
K_n has a higher linearity in the lower concentration range.
To further improve the two-dimensional algorithm, a more thorough selection of reference environments, concentration step size, and their disposition within sensors’ working range may be performed.
7. Summary and Conclusions
In this work, we have presented a two-dimensional pressure compensation algorithm for NDIR sensors. For a typical indoor NDIR gas sensor application, with an accuracy of ±30 ppm and ±3% of sensor reading, the need for pressure compensations is limited. However, for demanding applications such as environmental and atmospheric research, pressure dependent concentration measurements can be a major limitation for this technique. The presented algorithm reduces the resulting compensation error caused by concentration dependence in the general one-dimensional compensation algorithm.
The general one-dimensional pressure compensation algorithm was initially investigated. The compensation parameters obtained in reference conditions, including all measurement uncertainties, were derived from the measured values. At a specific concentration, the compensated concentration, qcomp shows deviation of less than 1% relative to the reported sensors concentration under standard pressure over the whole calibration pressure range.
The one-dimensional pressure compensation algorithm is widely used today. However, direct application of compensation parameters obtained in one reference concentration may lead to significant errors if these are used for compensation of concentrations away from this reference environment.
In order to solve the problem of concentration dependence, a second dimension was introduced.
From the physical point of view, a two-dimensional compensation makes sense since the molecule absorption cross section is pressure-dependent. A one-dimensional compensation can only handle the pressure effects from the ideal gas law and the absorption cross section variation at one specific concentration.
The functionality and accuracy of the presented two-dimensional algorithm was verified and estimated by calculating the compensation error for two independent reference concentrations. The resulting accuracy shows a compensation error of −0.02% and 0.83% for the reference values 800 ppm (at 0.72 Bar) and 3000 ppm (0.55 Bar), respectively. This could be compared to compensation errors of 5.1% and −7.3% achieved by the one-dimensional method in similar conditions. The accuracy of the one-dimensional method can be improved by obtaining calibrations parameters in many additional reference gas environments with high resolution. However, a calibration procedure involving a large number of reference gases (e.g., 20 concentrations), evaluated at several pressure points (e.g., approx. 8–10), would result in a need to store up to 200 compensation parameters.
In contrast, the two-dimensional compensation algorithm presented in this work only requires calibration in four reference gases and the storage of four sets of polynomial coefficients used for calculations. Therefore, the implementation of a second dimension leads to a negligible increase in memory and computation requirements and requires a less extensive calibration procedure.