l Definitions of precision and accuracy
l Factors influencing the precision
l Factors influencing the accuracy
Concepts of precision and accuracy
The non-dispersive infrared (NDIR) gas sensor is a compact optical measurement system. It is well known that measurement uncertainty is associated with each measurement because the measurement system must have some measurement error. The measurement error introduces the two essential concepts of precision and accuracy, which are the key indicators to evaluate the measurement system's performance. As shown in the upper left figure in Figure 1, we need a sensor where both precision and accuracy meet expectations. In this article, we take CO2 gas detection as an example for further explaining.
Figure1. Accuracy and Precision 
Accuracy refers to the bias from the measured value to the true value, which is usually expressed as follows:
1) Absolute accuracy is the absolute difference between the measured and true values. Absolute error is usually used to describe the error of a sensor at a particular measurement point in the measurement range.
2) Full-scale (F.S.) accuracy can be interpreted literally. If a sensor's measurement range is from 0 ppm to 5000 ppm, and the maximum error of measurement result is ±100 ppm, the full range accuracy is ±2% F.S.
3) Reading error or true value accuracy refers to the percentage of measurement error to the current reading/true value. For example, if the true value of CO2 concentration in the measurement environment is 2500 ppm, and the sensor's reading is 2400 ppm, then the reading accuracy is about -4.2%, while the true value accuracy is -5%.
4) Full-scale accuracy and reading (or true value) accuracy describe the relative accuracy. However, according to the output characteristics of the NDIR gas sensor, it is insufficient to indicate the detailed performance of accuracy in the full measurement range if we only useeither relative or absolute accuracy. Therefore, we used to use absolute accuracy plus relative accuracy to describe the sensor's accuracy. For example, if a sensor has an accuracy of ±(50 ppm + 5% reading), the maximum error is ±300 ppm at 5000 ppm but ±75 ppm at 500 ppm.
Precision refers to the closeness (or variation) of two (or more) measurement results. The metrics for precision are repeatability error and reproducibility error.
1) Repeatability error is the variation between readings obtained from multiple measurements in a shorter time when the measurement condition remains constant. The calculation formula is as follows:
Where σ is the standard deviation of the readings for multiple measurements, x̅ is the mean of the readings. In field applications, we can also use σ to indicate the absolute repeatability error at a specified concentration and the percentage of maximum σ to full scale (F.S.) to indicate the repeatability error in the full measurement range.
2) Reproducibility error refers to the variation of multiple measurement readings by different appraisers using the same measurement system. The measurement process of the NDIR CO2 sensor requires no manual intervention, so there is no concern about reproducibility error.
Factors influencing the precision
The precision of the sensor is an intrinsic characteristic of the sensor, which is determined by the signal-to-noise ratio (SNR) of the sensing signal and can be improved by signal processing. We introduce the precision of the sensors from three perspectives: signal sensitivity, noise level, and digital filtering.
1) Signal sensitivity. The sensitivity of a CO2 sensor refers to the thermopile's signal voltage change per unit gas concentration change. Higher sensitivity makes it easier to recognize the small gas concentration change. With higher sensitivity, the signal is more capable of tolerating the noise, which also means that we can choose components with relatively poor noise performance (such as operational amplifiers, power supplies, resistors, etc.), thus reducing the BOM cost.
One way to improve sensitivity is to choose a higher-performance sensing element. In addition, according to Bill Lambert's Law (see Unitense paper "Non-dispersed infrared (NDIR) Carbon Dioxide (CO2) Sensor Working Principle"), the sensitivity can be improved by increasing the effective incident radiation intensity or the equivalent optical path length.
Figure 2. The design concept of theoptical chamber
Effective incident radiation intensity refers to the initial intensity of the infrared rays emitted from the light source and can be effectively absorbed by the sensing element. The infrared rays from the light source spread in all directions, and the reflected surface and the target gas gradually attenuate their intensity. Because of the excessive reflections, the signal intensity of some rays was negligible when they arrived the sensing surface, so these rays are ineffective incident light. Using the optical simulation software for experimental design, such as changing the geometry of the reflective surface to focus more light beams on the sensing surface, can improve the effective radiation intensity. As shown in figure 2, the effective radiation intensity of the design scheme a) is 3.5 times that of scheme b). The measurement result matches well with the simulation result. In addition, choosing appropriate optical materials, using an optimized coating process, and choosing a filter with higher transmittance can also improve the effective light intensity. Another benefit is that by enhancing the effective radiatoin intensity, we can apply lower operating voltage to the light source, reducing the sensor's power consumption. The NDIR sensor's lifetime almost only depends on the lifetime of the light source, and a lower power supply voltage means a longer working life of the light source and the sensor.
The equivalent optical path length is the mean distance of the effective radiation rays passing thru the CO2 gas, if the emitted infrared radiation is abstracted as independent rays. Improving the equivalent optical path length and the effective incident light intensity are based on the same target that the incident rays need to reach the sensing surface, so they are correlated. The means conducive to enhancing the effective radiation intensity also improve the equivalent optical path length. For example, we can increase the equivalent optical path length by using the optical design method.
2) Noise. "Like diseases, noise is never eliminated, just prevented, cured, or endured, depending on its nature, seriousness, and the cost to treating" . The noise mentioned here refers specifically to electronic noises. The NDIR sensor signal is subject to signal conditioning and digital signal processing before being transferred to the output end. During this process, the signal is constantly disturbed by the noises. Therefore, we often focus on the SNR of the sensor: the ratio of signal power to noise power. The smaller the noise power, the larger the sensor SNR, the easier the weak signal change can be identified, and the better the sensor performance. Noise can be divided into internal noises and external noises. Internal noises, also known as intrinsic noises, are generated by components and circuits of the sensor; external noises, also called interference noises, come from the exterior of the circuit and couple into the circuit from somewhere .
Figure 3. Probability distributionof Gaussian noise 
Internal Noises are usually random noises and can be represented by statistical methods.The peak-to-peak (p-p) value and the root mean square (RMS) value (also knownas the effective value of noises) are often used to describe the noise degree quantitatively. As shown in Figure 3, the probability of the Gaussian noise exceeding σ is less than 0.1%, so when observing the noise through the oscilloscope, we often consider that the p-p noise is 6.6 times of the RMS noise. The noise power spectral density can describe the noise with more detail, and there is a conversion relationship between noise power spectral density and the RMS noise value . Internal noises can be subdivided into thermal noise, flicker noise (1/f noise), shot noise, quantum noise, and diffusion noise. The internal noise sources of NDIR CO2 sensors include: the sensing element, resistors and amplifiers in the gas signal amplification circuit, the thermistor and resistors in the temperature signal conditioning circuit, the analog-to-digital converter (ADC) module, and the power supply module (for example voltage regulator). From the datasheet, calculation, simulation, and measurement, the noises of the components and the module can beobtained, and the total output noise of the sensor can be calculated. We can then follow the robust design method and design of experiments (DOE) method to reduce the internal noises to a reasonable level through components selection and circuit optimization to achieve optimal cost performance.
External Noises -related studies are called electromagnetic compatibility (EMC) studies. The external noises must be coupled to the internal circuit through some transmission routing, so the key to solving the external interference is to cut off the transmission routing. The coupling pathway of external noises can be divided into the conductive coupling and radiative coupling, and radiative coupling can be further divided into electric field coupling, magnetic field coupling, and electromagnetic coupling. When encountering electromagnetic compatibility problems, we can suppress the transmission of external interference through components selection, filtering, shielding, grounding, layout optimization, and other methods. Unitense's NDIR CO2 sensor has been implemented with EMC-related design and optimization, but we still need to pay special attention: reasonable and adequate anti-interference measures depend on the understanding of the specific application environment. We must fully cooperate with the customers to identify the external noise sources and then take appropriate noise suppression measures. When necessary, a re-design of the sensor for specific applications may be considered. In addition, the NDIR CO2 sensor is a compact module that is only a part of the entire equipment or system assembly. If we only think of the EMC measures at the sensor end, some actions may be redundant, not cost-effective, or even unachievable. As a professional automotive CO2 sensor vendor, Unitense provides advanced product quality planning (APQP) processes to track the failure chain to the end system.
Figure 4. Filter and response time
3) Digital filtering can improve sensor precision when the hardware is determined and limited. Digital filtering is often combined with oversampling. A 12-bit ADC, with a 256 (44) oversampling method, can obtain 16-bit sampling precision . The measurement target of the NDIR sensor is the gas (for example, CO2). In most applications, the CO2 diffusion progress and concentration change speed is relatively slow, so the sensor's measurement period is usually in seconds. In such a non-real-time scenario, oversampling technology can be used without a doubt. Note that the sensor's response time is often opposed to the digital filtering effect. Digital filtering can cause a delay in response. Usually, the better the filtering effect, the more the delay. As shown in Figure 4, the same kind of samples with different digital filtering algorithms, placed in the same environment, are significantly different in response time to a rise or fall in the gas concentration.
Some application scenarios have demands on both the sensor's precision and response time. As an example, demand-controlled ventilation (DCV) takes the concentration of carbon dioxide as the feedback to control the running state of the ventilation device. To achieve better control precision and faster convergence speed of the control, the carbon dioxide sensor should have high precision and quick response at the same time. Therefore, in selecting sensors, we should pay attention to both the precision before and after digital filtering. The high precision before filtering indicates that the hardware-based SNR of the sensor is good and does not rely on a complex digital filtering algorithm. If only the precision after filtering is acceptable, it only means that the digital filtering is working, but the response time is usually longer. However, in some cases, good filtering algorithms can achieve the best compromise between the sensor precision and the response time. Based on the research on the signal chain modeling of NDIR CO2 sensors, Unitense has developed patented algorithms that consider both accuracy and response time for different applications. Please consult customer service for a detailed application.
Factors influencing the accuracy
The factors affecting the accuracy of NDIR CO2 sensors mainly include calibration accuracy, temperature drift, and time drift.
1) The calibration accuracy. The measured gas concentration and the sensor output voltage signal can be described as a logarithmic curve. The calibration process of the sensor is as follows: set at least two known concentration points as the calibration points at a specific temperature and record the sensor output voltages (ADC value) corresponding to the reference concentration of the calibration points. Next, based on the calibration data, the fitting coefficient of the sensor output characteristic curve can be calculated to obtain the fitting equation between the gas concentration and the output voltage. Through the description of the calibration process above, we can see that, besides the calibration algorithm, accuracy of the reference concentration determines the calibration accuracy of the sensor. For example, if the calibration system gives a reference target gas concentration of 980 ppm when the actual concentration is 1000 ppm, then the deviation of minus 20 ppm will be introduced. Many factors affect the accuracy of the calibration system in high-volume production, including but not limited to the error of the reference gas analyzer (or standard gas), and the distributed error of gas concentration and temperature due to the large calibration chamber. We can identify the total error of the calibration system through the measurement system analysis (MSA) method and carry out the optimization accordingly. In addition, it is also necessary to calibrate the system regularly.
2) Temperature drift. When the ambient temperature changes, the performance of regulators, thermopile, signal conditioning circuit, and ADC change. Furthermore, the optical parts also have thermal deformation, which causes the drift of optical signal strength. All of these changes affect the accuracy of the sensor. The thermistor embedded in the sensor module can measure the temperature change. The relationship between the sensor signal and the temperature change can be measured and recorded. Then, the sensor signal offset caused by the temperature change can be compensated through the temperature curves. Because electronic components and the sensor have process variations, the degree of temperature drift varies from individual to individual. If only the constant temperature compensation coefficients are used for each sensor, the sensor accuracy will not be good in high or low temperatures. Calibrating individual sensors at multiple temperature points is recommended to eliminate accuracy errors caused by temperature drift. Unitense applies multi-temperature point compensation to each sensor. Therefore the sensor accuracy can be guaranteed in the entire working temperature range.
3) Time drift. similar to temperature drift, the electronics and sensors aged over time, resulting in a signal drift over time. For the optical CO2 sensor, because the light source is often worked at a relatively high temperature, it is easier to be aged. This is the major reason leading to the time drift. Some methods can significantly reduce the influence of time drift. One approach utilizes the dual-channel optical design: The sensor has a light source and two sensing elements. Channel one is a sensing element equipped with a narrow-band filter with a center frequency of 4.26 μm, and another is a sensing element equipped with a narrow-band filter with a center frequency of 3.91 μm. Since the natural compound gas does not absorb the infrared radiation at 3.91 μm wavelength, we can regard the radiation intensity corresponding to the 3.91 μm channel as the incident radiation intensity and the intensity corresponding to the 4.26 μm channel the absorbed intensity. Based on this design, the incident and absorbed radiation intensity ratio decrease simultaneously when the light source is aged. Per Lambert Beer's law, it is not difficult to see that the impact of the aging of the light source can be offset. The second method is applying an automatic baseline calibration: the CO2 concentration in the open air of a place is usually fixed and known (e.g., 420 ppm), which is called the baseline concentration. Suppose the sensor's working environment can connect with open air via ventilation for a period. In that case, the sensor can automatically record the minimum readings of the period (e.g., 425 ppm), compared with the baseline concentration (e.g., 420 ppm), the sensor error can be calculated (e. g. 425 - 400 = 5 ppm), and this compensation value is written to the memory. It can be used to correct the time drift of the sensor. For detailed information on automatic baseline calibration, please refer to the technical article "Automatic Baseline Calibration of NDIR Carbon Dioxide Sensors".
This paper is to introduce the accuracy and precision of the NDIR CO2 sensor from the design and application perspective. Please refer to other documents from Unitense website to inquire more about field applications. The copyright of this paper belongs to Unitense Innovation. Reproduce is prohibited.
 B YJUS , "Accuracy And Precision -The Art Of Measurement", https://byjus.com/physics/accuracy-precision-measurement/, 2022.
 V.Gabriel, "Electronic Noise and Interfering Signals", Springer-Verlag, 2005.
 M.W.Toews, "Normal distribution", https://en.wikipedia.org/wiki/Normal_distribution, Feb, 2005. R.Moghimi, "Seven Steps to Successful Analog-to-Digital Signal Conversion", Analog Devices: MS-2022, May.2011.