Next Article in Journal
Model-Based 3D Gaze Estimation Using a TOF Camera
Previous Article in Journal
Study on the Influence of Label Image Accuracy on the Performance of Concrete Crack Segmentation Network Models
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Calibration of a Low-Cost Methane Sensor Using Machine Learning

Computational Engineering and Design Group, Faculty of Engineering and Physical Sciences, University of Southampton, Southampton SO17 1BJ, UK
*
Author to whom correspondence should be addressed.
Sensors 2024, 24(4), 1066; https://doi.org/10.3390/s24041066
Submission received: 20 December 2023 / Revised: 23 January 2024 / Accepted: 1 February 2024 / Published: 6 February 2024
(This article belongs to the Special Issue Gas Sensors: Progress, Perspectives and Challenges)

Abstract

:
In order to combat greenhouse gas emissions, the sources of these emissions must be understood. Environmental monitoring using low-cost wireless devices is one method of measuring emissions in crucial but remote settings, such as peatlands. The Figaro NGM2611-E13 is a low-cost methane detection module based around the TGS2611-E00 sensor. The manufacturer provides sensitivity characteristics for methane concentrations above 300 ppm, but lower concentrations are typical in outdoor settings. This study investigates the potential to calibrate these sensors for lower methane concentrations using machine learning. Models of varying complexity, accounting for temperature and humidity variations, were trained on over 50,000 calibration datapoints, spanning 0–200 ppm methane, 5–30 °C and 40–80% relative humidity. Interaction terms were shown to improve model performance. The final selected model achieved a root-mean-square error of 5.1 ppm and an R2 of 0.997, demonstrating the potential for the NGM2611-E13 sensor to measure methane concentrations below 200 ppm.

1. Introduction

Atmospheric methane (CH4) plays a significant role in global warming. Methane is released into the atmosphere through a combination of natural sources (e.g., peatlands), human activities (e.g., agriculture, pipeline leaks) and the release of trapped stores due to rising global temperatures (e.g., permafrost melt) [1].
A variety of approaches exist for monitoring methane emissions. Beginning with the greatest coverage, satellites can provide global methane concentration data but are limited in either temporal or spatial resolution [2]. Existing satellites are also limited in the terrains over which methane concentration measurements can be taken; data cannot be provided for sea, snow or marshland. Higher-resolution surveys may be carried out by aircraft or ground teams but these methods require additional labour for each new dataset collected.
Autonomous local sensors, such as weather stations, address these issues, continuously collecting data at high frequencies, in some cases every few seconds. However, many weather stations are permanent standalone installations, based in cities, and, as such, have limited spatial coverage. To compensate for this, wireless sensor networks and “Internet of Things” (IoT) devices are increasingly used to augment datasets, especially in the field of air pollution monitoring, adding additional data collection sites [3,4,5,6,7,8]. IoT devices are typically powered by batteries or small solar panels; therefore, minimising power consumption is crucial [9]. Much of the value of wireless sensor networks lies in their coverage and scalability, so enabling large fleet sizes by minimising the individual device cost is also a key consideration [5]. As such, the sensors included in these devices should accommodate these requirements.
Many categories of methane sensors have been developed: optical, capacitance-based, calorimetric, resonant, acoustic-based, pyroelectric, metal oxide semiconductor (MOS), and electrochemical [1,10,11]. Of these types, MOS sensors show particular potential for compact, low-power and low-cost applications, but additional steps must be taken to improve their performance in outdoor settings [10,12,13,14,15,16].
Machine learning techniques are often employed to improve the usability of gas sensor data, by addressing either the selectivity of the sensor or the calibration accuracy [11,13,17]. Classification algorithms, such as support vector machines and neural networks, have been shown to improve the ability of both individual sensors and sensor arrays to identify specific target gases or gas mixtures [18,19,20,21,22,23]. This approach holds promise for a variety of emerging applications, ranging from disease diagnosis from the gas composition of human breath [22] to identifying specific sources of air pollution in urban environments. Regression machine learning can be used to calibrate the output of gas sensors in varying environmental conditions—i.e., target gas concentration, temperature and air humidity—and to offset long-term sensor drift [24].
The Figaro NGM2611-E13 (Figaro, Rolling Meadows, IL, USA) is a low-cost methane detection module based around the TGS2611-E00 MOS sensor [25]. The manufacturer provides sensitivity characteristics for methane concentrations above 300 ppm [26], but lower concentrations are typical in outdoor settings.
Several authors have investigated methods for calibrating this sensor at lower methane concentrations [14,15,16]. Results are consistently encouraging, with strong correlation between calibrated sensor output and true methane concentration achieved in all of these studies.
Van den Bossche et al. [14] calibrated a TGS2611-E00 methane sensor across 15–30 °C, 40–80% relative humidity and 2–9 ppm methane. Methane concentration was recorded using a Picarro G2301 Cavity Ringdown Gas Analyzer (Picarro, Santa Clara, CA, USA). For this limited methane concentration range, a linear fit was assumed for the sensor calibration, with temperature and humidity compensation applied separately. Within this range, a systematic error of −1.0 ppm and a variable error of ±1.7 ppm in estimated methane concentration were achieved. It should be noted that a linear fit cannot be assumed for wider ranges of methane concentration; an exponential relationship is visible in the 300–10,000 ppm range published by the manufacturer [26].
Bastviken et al. [16] investigated a calibration approach for the NGM2611-E13 using estimated background methane concentration in a chamber, followed by the injection of methane up to 719 ppm. They tested 15 model equations with the collected chamber data, achieving strong correlation between the model output and true methane concentration (R2 = 0.99–1.00) and low error (RMSE = 9.8–20) over the full tested concentration range up to 719 ppm.
These existing studies share two main limitations: (1) expensive reference instruments are used to measure methane concentration during sensor calibration, and (2) potential interactions between temperature, humidity and methane concentration are not addressed.
Collier-Oxandale et al. [15] calibrated the Figaro TGS 2600 by co-deploying sensors with reference-grade instruments in field deployments, during which methane concentrations remained below 6 ppm. Variable correlations were achieved between the sensors and reference measurements (R2 = 0.625–0.812) for the best-performing model. Terms representing the interaction between temperature and methane concentration were considered, but all of the models which contained such a term also included a time-based term. As recurring diurnal emission cycles are not universal and will vary by site, time-based predictor variables are not applicable to pre-deployment sensor calibration.
This study presents an alternative calibration approach using 200 ppm methane-in-air calibration gas and machine learning models. The calibration conditions span 5–35 °C and 40–85% relative humidity. A range of nonlinear models derived from the sensor response to varying methane concentration, temperature and humidity were formulated and tested, including models with interaction terms. A calibration validation method using 200 ppm methane in air is also presented.

2. Materials and Methods

2.1. Methodology Overview

An overview of the methodology approach is depicted in Figure 1. These stages are explained in more detail in the following subsections.

2.2. Methane Sensor Characteristics

The NGM2611-E13 is a module designed for use in natural gas leak detectors. This sensor module was selected for investigation in this study as it meets the requirements of sensors for typical IoT devices; the sensor is affordable (<GBP 30 per unit), compact (27 × 12.5 × 14.1 mm), and has an operating voltage of 5 V.
The sensing element in the module is a TGS 2611-E00. The NGM2611-E13 and TGS 2611-E00 datasheets provided by Figaro include characterisation data for the methane sensor across a range of temperature (−10–40 °C), relative humidity (35–95%) and methane concentration (300–10,000 ppm) conditions [25,26]. The sensor response is described by the ratio R S / R 0 , where R S is the measured sensor resistance and R 0 is the sensor resistance in 5000 ppm of methane at 20 °C, 65% relative humidity (RH).
The NGM2611-E13 sensor module comprises a methane sensing element ( R S ), a current limiting resistor ( R L ) and a heating element ( R H ). The sensing element is arranged in a potential divider circuit (Figure 2), such that the sensor output voltage, V o u t , can be calculated as:
V o u t = ( V C · R L ) / ( R L + R S )
where V C is the supply voltage for the sensor circuit (i.e., 5V), R S is the measured sensor resistance and R L is the value of a fixed resistor (given as 10.0 k Ω ± 1 % for standard test conditions in the sensor datasheet).
Using this equation and data extracted from the Figaro datasheets, Figure 3, Figure 4 and Figure 5 were constructed to visualise the influence of methane concentration, temperature and relative humidity on the sensor output voltage.
In early chamber experiments, an initial warm-up period was identified for the NGM2611-E13 (Figure 6). In normal operation, a linear relationship is observed between the sensor output voltage and the air temperature. For up to 4 h after being powered, the sensor output does not follow this trend, presumably because the heating element in the sensor takes time to reach thermal equilibrium with the surrounding air. To avoid disrupting the calibration data, this warm-up period was excluded from the calibration data for the experiments detailed later.

2.3. Model Form

In this study, we consider a nonlinear regression machine learning approach. Compared with more complex approaches, such as neural network models, nonlinear regression models are easier to interpret in terms of how the output is affected by each predictor. Nonlinear regression models also require less training time and smaller training datasets once the model form has been selected.
In order to determine a suitable form for the methane sensor calibration model, we first consider the influence of methane concentration, temperature and humidity on the sensor output voltage.
From Figure 3, we can derive a relationship between V o u t and methane concentration of the form:
M = C 1 · e C 2 · V o u t
where M is the methane concentration in ppm, C 1 and C 2 are temperature- and humidity-dependent constants and V o u t is the sensor output voltage in V. This forms the starting point for our model.
Figure 4 and Figure 5 show a logarithmic relationship between the sensor output voltage and temperature or humidity. For the same methane concentration, a higher temperature or higher humidity will increase the sensor output voltage. Note that a linear fit may be a sufficient approximation for small temperature variations, as shown by the dashed line in Figure 4, but a logarithmic fit provides a higher coefficient of determination and smaller residuals, so it was selected for use in this study.
Incorporating additional terms for the effect of temperature, humidity and interactions between the variables, a general model form is proposed:
M = C 1 + C 2 · e C 3 · V o u t C 4 ln ( T + α ) C 5 ln ( H + β ) C 6 ln ( ( T + α ) ( H + β ) ) C 7 ln ( ( T + α ) V o u t ) C 8 ln ( ( H + β ) V o u t )
where M is the methane concentration in ppm, C 1 C 8 are constants to be optimised by the fitting algorithm, α and β are offsets to be applied to the temperature and humidity terms, respectively, T is temperature (°C), H is relative humidity (%) and V o u t is the methane sensor output voltage (V).

2.4. Initial Model Testing and Shortlisting

The data shown in Figure 3, Figure 4 and Figure 5 were compiled into a training dataset (Figure 7) to determine an appropriate non-linear model form. This dataset was used to test a series of sensor calibration models of increasing complexity, starting with a calibration based only on the sensor output voltage and gradually adding compensation for temperature and humidity. “Complexity” is defined as the number of constant terms + the number of variable terms used in the model. These models are listed in Table 1.
Nonlinear regression models are trained by taking an equation that relates a continuous response variable to one or more predictor variables and adjusting the coefficients of the equation to optimise its fit to the provided training data. In this case, the response variable is methane concentration and the predictor variables are sensor output voltage, temperature and relative humidity. Each model was optimised using the MATLAB “fitnlm” function [27]. Initial estimates were set to 0 for all coefficients. A termination tolerance of 1×10 −8 and a limit of 200 iterations were used.

2.5. Collection of Calibration Data

Four NGM2611-E13 methane sensors were placed inside a vacuum chamber set up as shown in Figure 8. The output voltage and internal reference voltage of the sensors were measured using a pair of Velleman 4-channel ADS1115 16-bit Analog-to-digital converter I²C modules (Velleman, Gavere, Belgium) [28]. An ICP-10125 high-accuracy pressure sensor (InvenSense, San Jose, CA, USA) [29] measured air pressure and temperature inside the chamber. An Arduino datalogger provided power to the sensors inside the chamber and recorded the sensor readings to a micro SD card every 2–3 s (Arduino, Somerville, MA, USA).
A vacuum pump connected to the inlet hose was used to evacuate the air from inside the chamber whilst the sensors were powered off. Then, 200 ppm methane in air calibration gas [30] was used to refill the chamber to atmospheric pressure. Over the course of up to 24 h for each methane concentration level, sensor readings were recorded by the external Arduino datalogger. The experiment was repeated using calibration air (20.9% oxygen balanced in nitrogen) and at low, moderate and high temperatures and relative humidity. The vacuum chamber was placed in an ice bath to gather sensor readings at low temperatures. A higher humidity was created in the vacuum chamber by placing a small dish of ice cubes in the base of the chamber. An overview of the calibration data collected is shown in Figure 9.

2.6. Model Testing on New Calibration Data

Using the calibration data, the model equations carried over from the tests on the data from the sensor datasheets were optimised using the same process as before. As the four methane sensors showed very similar responses (Figure 9), the models were trained on only one of the sensors.
To investigate if improved model performance could be achieved, manually adjusted variations of Equation (20) with different temperature and humidity offsets were also tested. Table 2 lists two variations: Equation (21) is the model which yielded the lowest RMSE and highest coefficient of determination (R2), and Equation (22) is a variation of the same form without a humidity offset applied.

2.7. Methane Decay Experiments

To check the validity of the calibrated models and identify any model overfitting, two experiments with a decaying methane concentration were performed. The sensors were placed inside a sealed vacuum chamber. Then, 200 ppm methane in air calibration gas was injected into the chamber to raise the methane concentration, and the second inlet valve was opened to equalise the pressure inside the chamber. This process was repeated until the sensor readings no longer rose when additional calibration gas was injected—i.e., when the methane concentration within the chamber had reached approximately 200 ppm. The chamber inlets were then opened, allowing the methane concentration inside the chamber to steadily decay towards the external ambient concentration. This experiment was repeated twice: the first experiment was run in ambient conditions (19–25 °C) over 4 days; the second utilised an external ice bath to vary the chamber temperature over a wider range (8–30 °C) and a shorter period of 2 days (Figure 10).
A valid model would be expected to show the following features when applied to each decay experiment:
  • A steady initial methane concentration below 50 ppm before the calibration gas was injected.
  • A peak concentration of around 200 ppm methane.
  • A steady decline in methane concentration following the peak.

3. Results

3.1. Initial Model Testing and Shortlisting

Table 3 summarises the performance of each of the model equations fitted on the training data shown in Figure 7. This table was used to determine which equations to pursue in the following calibration experiments.
Model Equations (1)–(4) and (7)–(10) were rejected, having R2 < 0.9. Equations (13) and (14) were more complex than Equation (12) but had a higher root-mean-square error (RMSE) and were therefore also rejected. Equation (19) performed similarly to Equations (15) and (17) (RMSE = 198, vs. RMSE = 196), warranting further investigation. Models which included the C 1 term generally presented slightly a higher RMSE than the corresponding equation of the same form without the C 1 term, but showed better performance at lower methane concentrations; as such, Equations (16), (18) and (20) were retained for further testing.

3.2. Methane Sensor Calibration

Model Equations (5) and (6) performed far worse on the calibration data than on the data extracted from the NGM2611-E13 datasheets, with lower R2 values (Table 4) than before (Table 3). Equation (5) overestimated the methane concentration for all 0 ppm methane datapoints and overcompensated for high temperatures at 200 ppm methane.
Equations (11), (15), (17) and (19) showed similar fits (Figure 11). All four of these models overestimate the methane concentration at 0 ppm and show inadequate temperature compensation at 200 ppm.
Equation (12) fitted similarly to Equations (11), (15), (17) and (19), with the main difference being that Equation (12) predicts negative values for the 0 ppm datapoints at moderate temperatures (around 15 °C) and high humidity (above 75%).
Of the models tested, model Equations (16), (18) and (20) demonstrated the best performance, with high R2 (0.997) and low RMSE (≈5.1 ppm) values (Table 4). These models also show fairly uniform fitting across the whole range of the calibration data (Figure 11). The coefficients for model Equation (16) are listed in Table 5.
Equations (21) and (22) showed marginally improved performance over Equations (16), (18) and (20), with a higher R2 (0.998) and lower RMSE (4.5 ppm and 4.79 ppm, respectively) but at the cost of much higher model complexity (Table 4).

3.3. Methane Decay Experiments

The rapid temperature change at around 0.7 × 105 seconds in the second decay experiment manifested as a spike around the same time in the estimated methane concentration for most of the model equations.
Equations (5) and (6) perform reasonably well for the first decay experiment but both underestimate the peak methane concentration in the second experiment.
Equations (11) and (12) overestimate the peak methane concentration in both decay experiments and also estimate different ambient methane concentrations at the start of the two experiments.
Equation (15) poorly compensates for temperature and humidity variations (Figure 12).
Equations (17) and (19) overestimate the peak methane concentration in both decay experiments.
Model Equations (16), (18), (20) and (21) provided the best performance for the decay experiments (Figure A5). For the first decay experiment, all four models estimate an initial methane concentration of around 30 ppm, a peak concentration of around 210 ppm and a smooth decay curve. Similarly, in the second decay experiment, the models estimate an initial methane concentration below 50 ppm, a peak concentration of around 225 ppm and an appropriate curve shape.
When applied to the decay experiment data, model Equation (22) displays clear signs of overfitting (Figure 12). Despite the high R2 (0.998) and low RMSE (4.79 ppm) of the model trained on the calibration dataset, in both decay experiments, the model fails to compensate for variations in temperature and humidity. This is most obvious from the sawtooth-shaped peaks in the first decay experiment, which correspond to peaks in the chamber temperature. The model also severely overestimates the methane concentration throughout the second decay experiment.

4. Discussion

This study aimed to investigate the practicality of using machine learning to calibrate low-cost methane sensors at lower methane concentrations than required for their typical applications.
The greatly improved performance of model Equation (11) (RMSE = 19.2, R2 = 0.962) compared to Equations (5) and (6) (RMSE = 55 and 35.6, R2 = 0.684 and 0.868, respectively) shows that both temperature and relative humidity need to be accounted for when calibrating the NGM2611-E13 sensor at methane concentrations below 200 ppm. The strong correlation of Equation (11) with true methane concentration also validates the approach of using an equation of this form to model the sensor readings.
Additional interactions between temperature, relative humidity and methane concentration are expected to affect the output voltage of the methane sensor. More complex machine learning models containing additional terms can capture these interactions and reduce the error in the model. However, increased complexity carries a greater risk of overfitting, which can render a model useless for making predictions from new data. The risk of overfitting can be reduced by expanding the training data or using more intensive model validation, both of which increase the computing load when training the model. Therefore, for any machine learning model, a balance exists between model robustness and detail.
In this study, increased model complexity broadly correlated with improved model performance: i.e., lower RMSE and higher R2. However, diminishing returns in increasing model complexity are also clearly shown by the results in Table 4. The best performing models: Equations (16), (18), (20) and (21), showed very similar performance (RMSE = 4.5–5.1 ppm, R2 = 0.997–0.998). The model with the next lowest RMSE was Equation (12) with RMSE = 14.2 ppm, which is almost three times that of the top four models. For model Equations (15)–(20), including an offset term, C 1 reduced the RMSE of each model by around 10 ppm. The additional improvement of Equations (16), (18), (20) and (21) over Equation (12) can be attributed to the inclusion of a temperature and sensor output voltage product term or a relative humidity and sensor output voltage product term. It is unsurprising that the effect of including either one of these terms, or both at the same time, is similar because relative humidity is roughly inversely proportional to air temperature in a sealed volume. Therefore, either term will effectively accommodate the same effect of the environmental conditions in the chamber.
Despite containing almost twice as many terms, model Equation (21) (RMSE = 4.5 ppm, R2 = 0.998) barely outperforms Equation (16) (RMSE = 5.09 ppm, R2 = 0.997). As shown by Equation (22), a model of this complexity is also more vulnerable to overfitting (Figure A5).
The methane decay experiments highlight the importance of verifying machine-learning models beyond simply assessing the nominal model performance. It would not be possible to identify the overfitting of Equation (22) using the training results alone, and applying this model to field data would severely misrepresent the true methane concentration.
Of the tested model equations, Equation (16) (RMSE = 5.09 ppm, R2 = 0.997, complexity = 12) offered the best compromise between performance and complexity.

4.1. Comparison to Related Studies

Compared with a similar study using the Figaro NGM2611-E13 by Bastviken et al. [16], the study presented here covered lower temperatures (5–30 °C vs. 10–42 °C) and higher relative humidities (40–85% vs. 18–70%). This study trained models on over 50,000 data points, whereas Bastviken et al. used an average of 619–930 data points per sensor. The models tested by Bastviken et al. included temperature and humidity compensation but did not test interactions between predictor variables. In this study, several models which included interaction terms outperformed those which did not, highlighting the importance of considering them in future models.
Bastviken et al. used two approaches to determine the methane concentration: direct measurement using a reference sensor (a Los Gatos Research ultraportable greenhouse gas analyzer), or estimating the background methane concentration. If validated and performed with care, background methane concentration estimations may simplify sensor calibration, but they have the potential to introduce systematic errors which may be of a similar order of magnitude to the methane concentrations that the calibrated sensors are intended to measure. This issue is more easily circumvented by supplying sensors with a known concentration of methane during calibration, as was achieved with the use of a reference gas in this study.
Collier-Oxandale et al. [15] employed co-location of the methane sensors with reference instruments during field deployment. As stated by Collier-Oxandale et al., this approach exposes sensors to representative field conditions, rather than constraining them to more conventional laboratory settings, which typically control environmental conditions more strictly than real-world settings. However, much longer co-deployments may be required to obtain a broad range of conditions. If no high-emission or extreme events occur during the co-deployment phase, sensor models calibrated in this way may be poorly calibrated for these scenarios, being weighted towards typical field concentrations. As previously mentioned, this study also used time-based predictor variables in most of the presented calibration models. As such, calibrations based on these models would not be transferable to sensors deployed in a different location. Laboratory-based calibration with a methane concentration range which extends beyond the expected range of field values can be more readily generalised and is less biased towards “normal” diurnal cycles or environmental conditions.
Van den Bossche et al. [14] calibrated a TGS2611-E00 methane sensor across 15–30 °C, 40–80% relative humidity and 2–9 ppm methane. Methane concentration was recorded using a Picarro G2301 Cavity Ringdown Gas Analyzer. The linear fit used for the sensor calibration is a reasonable simplification for narrow ranges of methane concentrations but would underestimate higher methane concentrations. As in the study by Bastviken et al., van den Bossche et al. applied temperature and humidity compensation but neglected interactions between environmental conditions and methane concentration. Arguably, this is less crucial at low concentrations but should be investigated as a potential method for further improving the performance of low-concentration calibrations.
Due to the different concentration ranges used, it is difficult to make direct comparisons between the accuracy of different calibration approaches across these studies. However, a strong correlation between sensor response and true methane concentration below 300 ppm is consistently achieved, and the need to apply both temperature and humidity compensation is identified by all authors.
In the context of commodifying methane sensors for IoT applications, a shared limitation across all of these studies is the use of expensive reference sensors in the calibration approach. Such instruments often cost tens of thousands of pounds, placing them beyond the reach of many citizen scientists or smaller research groups. The calibration air-based method presented in this study offers an alternative low-cost approach; the estimated total cost of the calibration setup (vacuum pump, chamber, Arduino datalogger and calibration gases) is under GBP 500.

4.2. Limitations and Future Work

The TGS2611-E00 sensor incorporates a charcoal filter which improves the sensor selectivity by reducing the influence of other gases, such as ethanol and iso-butane. However, the sensor is also sensitive to hydrogen, making it less appropriate for detecting low methane levels in environments where hydrogen may also be present. This is less likely to be an issue in outdoor settings where hydrogen levels are typically much lower than methane levels, but the incorporation of additional sensors to measure the concentration of interference gases should be considered in relevant applications.
The variable warm-up period for the NGM2611-E13 sensors may pose a barrier to their usage in low-power applications; future work should investigate the effect of this warm-up period on intermittently powered NGM2611-E13 sensors.

5. Conclusions

Overall, the experiments presented show that the NGM2611-E13 methane sensors show a similar relationship between sensor resistance and methane concentration at methane concentrations below the response documented by the manufacturer for methane concentrations in the 300–10,000 ppm range. The presented trained models show promise for calibrating the NGM2611-E13 methane sensors at low methane concentrations across a range of temperature and humidity conditions. The relative performance of different model equations highlights the importance of considering the interaction between predictor variables. For example, the inclusion of a temperature and sensor voltage interaction term was shown to reduce model error and improve the correlation between the model prediction and the true methane concentration.
The presented calibration approach offers an efficient method for calibrating NGM2611-E13 methane sensors using only two pre-balanced calibration gas mixtures and without depending on a more expensive state-of-the-art reference sensor to measure the methane concentration. Data collected at additional intermediate methane concentration levels could be used to further refine these models. Likewise, calibrating the sensors over an even broader range of temperature and humidity conditions may be valuable for environmental monitoring settings.
The methane decay validation experiment presents an intuitive method for identifying inadequacies in calibration models that may not be obvious from the performance of models on training data. For example, spikes in predicted methane concentration that coincide with spikes in temperature clearly indicate insufficient temperature compensation.
This approach to calibrating gas sensors below their intended application concentration ranges may be extended to other low-cost sensors in the future, with the potential to broaden the range of pollutants that can be monitored by wireless sensor networks.

Author Contributions

Conceptualization, H.L.M.; methodology, H.L.M., S.J.C. and H.G.L.; software, H.L.M.; formal analysis, H.L.M., S.J.C. and H.G.L.; investigation, H.L.M., S.J.C. and H.G.L.; data curation, H.L.M.; writing—original draft preparation, H.L.M.; writing—review and editing, H.L.M., S.J.C. and H.G.L.; supervision, S.J.C. and H.G.L. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by UK Research and Innovation grant number EP/R513325/1.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The calibration dataset can be found at: https://zenodo.org/doi/10.5281/zenodo.10405892 (accessed on 23 January 2024).

Acknowledgments

Thank you to Mike Godfrey for his help proofreading this paper, Phil Basford for his electronics advice, and to Jashree Bunge and Martin Browne for their assistance in acquiring the calibration gases.

Conflicts of Interest

The authors declare no conflicts of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.

Abbreviations

The following abbreviations are used in this manuscript:
CH4Methane
PPMParts Per Million
RHRelative Humidity
RMSERoot Mean Squared Error
SDSecure Digital

Appendix A

Figure A1. Trained models using Equations (5), (6), (11), (12), (15) and (16).
Figure A1. Trained models using Equations (5), (6), (11), (12), (15) and (16).
Sensors 24 01066 g0a1
Figure A2. Trained models using Equations (17)–(22).
Figure A2. Trained models using Equations (17)–(22).
Sensors 24 01066 g0a2

Appendix B

Figure A3. Estimated methane concentration from the decay experiment using model Equations (5), (6), (11) and (12).
Figure A3. Estimated methane concentration from the decay experiment using model Equations (5), (6), (11) and (12).
Sensors 24 01066 g0a3
Figure A4. Estimated methane concentration from the decay experiment using model Equations (15)–(18).
Figure A4. Estimated methane concentration from the decay experiment using model Equations (15)–(18).
Sensors 24 01066 g0a4
Figure A5. Estimated methane concentration from the decay experiment using model Equations (19)–(22).
Figure A5. Estimated methane concentration from the decay experiment using model Equations (19)–(22).
Sensors 24 01066 g0a5

References

  1. Aldhafeeri, T.; Tran, M.-K.; Vrolyk, R.; Pope, M.; Fowler, M. A Review of Methane Gas Detection Sensors: Recent Developments and Future Perspectives. Inventions 2020, 5, 28. [Google Scholar] [CrossRef]
  2. European Space Agency. Copernicus Sentinel-5P (Processed by ESA), 2021, TROPOMI Level 2 Methane Total Column Products; Version 02; European Space Agency: Paris, France, 2010. [Google Scholar] [CrossRef]
  3. Aberer, K.; Sathe, S.; Chakraborty, D.; Martinoli, A.; Barrenetxea, G.; Faltings, B.; Thiele, L. Opensense: Open community driven sensing of environment. In Proceedings of the ACM SIGSPATIAL International Workshop on GeoStreaming, San Jose, CA, USA, 2 November 2010; Volume 9, pp. 39–42. [Google Scholar]
  4. Mead, M.; Popoola, O.; Stewart, G.; Landshoff, P.; Calleja, M.; Hayes, M.; Baldovi, J.; McLeod, M.; Hodgson, T.; Dicks, J.; et al. The use of electrochemical sensors for monitoring urban air quality in low-cost, high-density networks. Atmos. Environ. 2013, 70, 186–203. [Google Scholar] [CrossRef]
  5. Sun, C.-Y.; Kato, S.; Gou, Z. Application of Low-Cost Sensors for Urban Heat Island Assessment: A Case Study in Taiwan. Sustainability 2019, 11, 2759. [Google Scholar] [CrossRef]
  6. Castell, N.; Dauge, F.R.; Schneider, P.; Vogt, M.; Lerner, U.; Fishbain, B.; Broday, D.; Bartonova, A. Can commercial low-cost sensor platforms contribute to air quality monitoring and exposure estimates? Environ. Int. 2017, 99, 293–302. [Google Scholar] [CrossRef]
  7. Shindler, L. Development of a low-cost sensing platform for air quality monitoring: Application in the city of Rome. Environ. Technol. 2019, 42, 618–631. [Google Scholar] [CrossRef]
  8. Bulot, F.M.; Johnston, S.J.; Basford, P.J.; Easton, N.H.; Foster, G.L.; Morris, A.K.; Cox, S.J.; Loxham, M. Long-term field comparison of multiple low-cost particulate matter sensors in an outdoor urban environment. Sci. Rep. 2019, 9, 7497. [Google Scholar] [CrossRef]
  9. Baranov, A.; Spirjakin, D.; Akbari, S.; Somov, A. Optimization of power consumption for gas sensor nodes: A survey. Sensors Actuators A Phys. 2015, 233, 27–289. [Google Scholar] [CrossRef]
  10. Dey, A. Semiconductor metal oxide gas sensors: A review. Mater. Sci. Eng. B Adv. 2018, 229, 206–217. [Google Scholar] [CrossRef]
  11. Yaqoob, U.; Younis, M.I. Chemical Gas Sensors: Recent Developments, Challenges, and the Potential of Machine Learning—A Review. Sensors 2021, 21, 2877. [Google Scholar] [CrossRef] [PubMed]
  12. Ji, H.C.; Zeng, W.; Li, Y.Q. Gas sensing mechanisms of metal oxide semiconductors: A focus review. Nanoscale 2019, 11, 22664–22684. [Google Scholar] [CrossRef]
  13. Fu, L.; You, S.; Li, G.; Li, X.; Fan, Z. Application of Semiconductor Metal Oxide in Chemiresistive Methane Gas Sensor: Recent Developments and Future Perspectives. Molecules 2023, 28, 6710. [Google Scholar] [CrossRef]
  14. van den Bossche, M.; Rose, N.T.; De Wekker, S.F.J. Potential of a low-cost gas sensor for atmospheric methane monitoring. Sensors Actuators B Chem. 2017, 238, 501–509. [Google Scholar] [CrossRef]
  15. Collier-Oxandale, A.; Casey, J.G.; Piedrahita, R.; Ortega, J.; Halliday, H.; Johnston, J.; Hannigan, M.P. Assessing a low-cost methane sensor quantification system for use in complex rural and urban environments. Atmos. Meas. Tech. 2018, 11, 3569–3594. [Google Scholar] [CrossRef] [PubMed]
  16. Bastviken, D.; Nygren, J.; Schenk, J.; Parellada Massana, R.; Nguyen, T.D. Facilitating the use of low-cost methane (CH4) sensors in flux chambers: Calibration, data processing, and describing an open source make-it-yourself logger. Biogeosciences 2019, 17, 3659–3667. [Google Scholar] [CrossRef]
  17. Yang, S.; Lei, G.; Xu, H.; Lan, Z.; Wang, Z.; Gu, H. A Review of the High-Performance Gas Sensors Using Machine Learning. In Machine Learning for Advanced Functional Materials; Joshi, N., Kushvaha, V., Madhushri, P., Eds.; Springer: Singapore, 2023; pp. 163–198. [Google Scholar] [CrossRef]
  18. Tonezzer, M.; Kim, J.H.; Lee, J.H.; Iannotta, S.; Kim, S.S. Predictive gas sensor based on thermal fingerprints from Pt-SnO2 nanowires. Sens. Actuators B Chem. 2019, 281, 670–678. [Google Scholar] [CrossRef]
  19. Schroeder, V.; Evans, E.D.; Wu, Y.-C.M.; Voll, C.-C.A.; McDonald, B.R.; Savagatrup, S.; Swager, T.M. Chemiresistive Sensor Array and Machine Learning Classification of Food. ACS Sens. 2019, 4, 2101–2108. [Google Scholar] [CrossRef] [PubMed]
  20. Wang, B.; Cancilla, J.C.; Torrecilla, J.S.; Haick, H. Artificial Sensing Intelligence with Silicon Nanowires for Ultraselective Detection in the Gas Phase. Nano Lett. 2014, 14, 933–938. [Google Scholar] [CrossRef] [PubMed]
  21. Hayasaka, T.; Lin, A.; Copa, V.C.; Lopez, L.P.; Loberternos, R.A.; Ballesteros, L.I.M.; Kubota, Y.; Liu, Y.; Salvador, A.A.; Lin, L. An electronic nose using a single graphene FET and machine learning for water, methanol, and ethanol. Microsyst. Nanoeng. 2020, 6, 50. [Google Scholar] [CrossRef]
  22. Shehada, N.; Bronstrup, G.; Funka, K.; Christiansen, S.; Leja, M.; Haick, H. Ultrasensitive Silicon Nanowire for Real-World Gas Sensing: Noninvasive Diagnosis of Cancer from Breath Volatolome. Nano Lett. 2015, 15, 1288–1295. [Google Scholar] [CrossRef]
  23. Acharyya, S.; Jana, B.; Nag, S.; Saha, G.; Guha, P.K. Single resistive sensor for selective detection of multiple VOCs employing SnO2 hollowspheres and machine learning algorithm: A proof of concept. Sens. Actuators B Chem. 2020, 321, 128484. [Google Scholar] [CrossRef]
  24. Gryech, I.; Ben-Aboud, Y.; Guermah, B.; Sbihi, N.; Ghogho, M.; Kobbane, A. MoreAir: A Low-Cost Urban Air Pollution Monitoring System. Sensors 2020, 20, 998. [Google Scholar] [CrossRef] [PubMed]
  25. Product Information NGM2611-E13—Pre-Calibrated Module for Methane. Available online: https://www.figarosensor.com/product/docs/ngm2611-e13_product%20information%28fusa%29_rev03.pdf (accessed on 21 September 2023).
  26. Technical Information for TGS2611. Available online: https://www.figarosensor.com/product/docs/Long2611CE%20Layout%20(1117).pdf (accessed on 21 September 2023).
  27. MATLAB Version: 9.13.0 (R2022b). Available online: https://www.mathworks.com (accessed on 21 September 2023).
  28. Velleman ADS1115 16-Bit 4-Channel AD Converter with I²C Module Datasheet. Available online: https://cdn.velleman.eu/downloads/25/vma453a4v01.pdf (accessed on 21 September 2023).
  29. ICP-10125 Datasheet. Available online: https://cdn.shopify.com/s/files/1/0174/1800/files/DS-000329-ICP-10125-v1.1.pdf?v=1634655171 (accessed on 21 September 2023).
  30. 200 ppm Methane Balanced in Air Product Page. Available online: https://products.shawcity.co.uk/products/methane-in-air?variant=41103143534745 (accessed on 21 September 2023).
Figure 1. Methodology flowchart.
Figure 1. Methodology flowchart.
Sensors 24 01066 g001
Figure 2. TGS 2611-E00 methane sensor circuit, adapted from [25].
Figure 2. TGS 2611-E00 methane sensor circuit, adapted from [25].
Sensors 24 01066 g002
Figure 3. Sensor output vs. methane concentration (extracted from Figaro datasheets and converted from sensor resistance ratio to V o u t ).
Figure 3. Sensor output vs. methane concentration (extracted from Figaro datasheets and converted from sensor resistance ratio to V o u t ).
Sensors 24 01066 g003
Figure 4. Sensor output vs. temperature at 5000 ppm methane concentration (extracted from Figaro datasheets [26] and converted from sensor resistance ratio to V o u t ).
Figure 4. Sensor output vs. temperature at 5000 ppm methane concentration (extracted from Figaro datasheets [26] and converted from sensor resistance ratio to V o u t ).
Sensors 24 01066 g004
Figure 5. Sensor output vs. humidity at 5000 ppm methane concentration (extracted from Figaro datasheets [26] and converted from sensor resistance ratio to V o u t ).
Figure 5. Sensor output vs. humidity at 5000 ppm methane concentration (extracted from Figaro datasheets [26] and converted from sensor resistance ratio to V o u t ).
Sensors 24 01066 g005
Figure 6. Example of the NGM2611-E13 sensor warm-up behaviour, showing stabilisation after around 4 h.
Figure 6. Example of the NGM2611-E13 sensor warm-up behaviour, showing stabilisation after around 4 h.
Sensors 24 01066 g006
Figure 7. Training data extracted from the Figaro datasheets [26] and converted from sensor resistance ratio to V o u t where required.
Figure 7. Training data extracted from the Figaro datasheets [26] and converted from sensor resistance ratio to V o u t where required.
Sensors 24 01066 g007
Figure 8. A diagram showing the vacuum chamber setup.
Figure 8. A diagram showing the vacuum chamber setup.
Sensors 24 01066 g008
Figure 9. A summary of the data used to calibrate the methane sensors: (a) methane concentration, (b) air temperature, and (c) relative humidity inside the chamber, and (d) the recorded voltage output of the NGM2611-E13 sensors in the chamber.
Figure 9. A summary of the data used to calibrate the methane sensors: (a) methane concentration, (b) air temperature, and (c) relative humidity inside the chamber, and (d) the recorded voltage output of the NGM2611-E13 sensors in the chamber.
Sensors 24 01066 g009
Figure 10. Recorded methane sensor output voltage, chamber temperature and relative humidity throughout the methane decay experiments.
Figure 10. Recorded methane sensor output voltage, chamber temperature and relative humidity throughout the methane decay experiments.
Sensors 24 01066 g010
Figure 11. A subselection of the trained models (Equations (15), (16), (21) and (22)). Plots showing all of the trained models are included in Appendix A.
Figure 11. A subselection of the trained models (Equations (15), (16), (21) and (22)). Plots showing all of the trained models are included in Appendix A.
Sensors 24 01066 g011
Figure 12. Estimated methane concentration from the decay experiment using model Equations (15), (16), (21) and (22). Plots showing all of the trained models are included in Appendix B.
Figure 12. Estimated methane concentration from the decay experiment using model Equations (15), (16), (21) and (22). Plots showing all of the trained models are included in Appendix B.
Sensors 24 01066 g012
Table 1. The model equations tested, where T is temperature (°C), H is relative humidity (%), V o u t is the sensor output voltage (V) and C 1 C 8 are constants to be optimised by the fitting algorithm.
Table 1. The model equations tested, where T is temperature (°C), H is relative humidity (%), V o u t is the sensor output voltage (V) and C 1 C 8 are constants to be optimised by the fitting algorithm.
No.Predicted CH4 Equation
1 C 2 · exp ( C 3 · V o u t )
2 C 1 + C 2 · exp ( C 3 · V o u t )
3 C 2 · exp ( C 3 · V o u t C 4 · ln ( T + 273.15 ) )
4 C 1 + C 2 · exp ( C 3 · V o u t C 4 · ln ( T + 273.15 ) )
5 C 2 · exp ( C 3 · V o u t C 4 · ln ( T + 65 ) )
6 C 1 + C 2 · exp ( C 3 · V o u t C 4 · ln ( T + 65 ) )
7 C 2 · exp ( C 3 · V o u t C 5 · ln ( H ) )
8 C 1 + C 2 · exp ( C 3 · V o u t C 5 · ln ( H ) )
9 C 2 · exp ( C 3 · V o u t C 4 · ln ( T + 273.15 ) C 5 · ln ( H ) )
10 C 1 + C 2 · exp ( C 3 · V o u t C 4 · ln ( T + 273.15 ) C 5 · ln ( H ) )
11 C 2 · exp ( C 3 · V o u t C 4 · ln ( T + 65 ) C 5 · ln ( H ) )
12 C 1 + C 2 · exp ( C 3 · V o u t C 4 · ln ( T + 65 ) C 5 · ln ( H ) )
13 C 2 · exp ( C 3 · V o u t C 4 · ln ( T + 65 ) C 5 · ln ( H ) ) C 6 · ln ( ( T + 65 ) · H )
14 C 1 + C 2 · exp ( C 3 · V o u t C 4 · ln ( T + 65 ) C 5 · ln ( H ) ) C 6 · ln ( ( T + 65 ) · H )
15 C 2 · exp ( C 3 · V o u t C 4 · ln ( T + 65 ) C 5 · ln ( H ) ) C 7 · ln ( ( T + 65 ) · V o u t )
16 C 1 + C 2 · exp ( C 3 · V o u t C 4 · ln ( T + 65 ) C 5 · ln ( H ) ) C 7 · ln ( ( T + 65 ) · V o u t )
17 C 2 · exp ( C 3 · V o u t C 4 · ln ( T + 65 ) C 5 · ln ( H ) ) C 8 · ln ( ( H · V o u t ) )
18 C 1 + C 2 · exp ( C 3 · V o u t C 4 · ln ( T + 65 ) C 5 · ln ( H ) ) C 8 · ln ( ( H · V o u t ) )
19 C 2 · exp ( C 3 · V o u t C 4 · ln ( T + 65 ) C 5 · ln ( H ) ) C 7 · ln ( ( T + 65 ) · V o u t ) C 8 · ln ( ( H · V o u t ) )
20 C 1 + C 2 · exp ( C 3 · V o u t C 4 · ln ( T + 65 ) C 5 · ln ( H ) ) C 7 · ln ( ( T + 65 ) · V o u t ) C 8 · ln ( ( H · V o u t ) )
Table 2. Additional manually adjusted model equations.
Table 2. Additional manually adjusted model equations.
No.Predicted CH4 Equation
21 C 1 + C 2 · exp ( C 3 · V o u t C 4 · ln ( T + 273.15 ) C 5 · ln ( H + 50 ) ) C 6 · ln ( H + 50 ) ) · ln ( V o u t )
C 7 · ln ( ( T + 273.15 ) · V o u t ) C 8 · ln ( T + 273.15 ) · ln ( H + 50 ) )
22 C 1 + C 2 · exp ( C 3 · V o u t C 4 · ln ( T + 273.15 ) C 5 · ln ( H + 0 ) ) C 6 · ln ( H + 0 ) ) · ln ( V o u t )
C 7 · ln ( ( T + 273.15 ) · V o u t ) C 8 · ln ( T + 273.15 ) · ln ( H + 0 ) )
Table 3. A summary of the performance of the optimised model equations listed in Table 1, tested using the training data extracted from the Figaro datasheets [26].
Table 3. A summary of the performance of the optimised model equations listed in Table 1, tested using the training data extracted from the Figaro datasheets [26].
Model No.RMSE (PPM)R2Complexity
11.35 × 1030.7243
21.27 × 1030.7584
31.08 × 1030.8236
49120.8767
57350.9186
67250.9227
71.21 × 1030.7835
81.16 × 1030.8016
99350.8708
108490.8949
112380.9928
122310.9929
132380.99212
142630.99013
151960.99412
162240.99313
171960.99411
181970.99412
191980.99415
202240.99316
Table 4. A summary of the performance of the optimised model equations tested using experimental data from 0–200 ppm methane concentrations.
Table 4. A summary of the performance of the optimised model equations tested using experimental data from 0–200 ppm methane concentrations.
Eq.Predicted CH4 EquationRMSE (ppm)R2Complexity
5 C 2 · exp ( C 3 · V o u t C 4 · ln ( T + 65 ) ) 550.6846
6 C 1 + C 2 · exp ( C 3 · V o u t C 4 · ln ( T + 65 ) ) 35.60.8687
11 C 2 · exp ( C 3 · V o u t C 4 · ln ( T + 65 ) C 5 · ln ( H ) ) 19.20.9628
12 C 1 + C 2 · exp ( C 3 · V o u t C 4 · ln ( T + 65 ) C 5 · ln ( H ) ) 14.20.9799
15 C 2 · exp ( C 3 · V o u t C 4 · ln ( T + 65 ) C 5 · ln ( H ) ) C 7 · ln ( ( T + 65 ) · V o u t ) 160.97312
16 C 1 + C 2 · exp ( C 3 · V o u t C 4 · ln ( T + 65 ) C 5 · ln ( H ) ) C 7 · ln ( ( T + 65 ) · V o u t ) 5.090.99713
17 C 2 · exp ( C 3 · V o u t C 4 · ln ( T + 65 ) C 5 · ln ( H ) ) C 8 · ln ( ( H · V o u t ) ) 14.70.97711
18 C 1 + C 2 · exp ( C 3 · V o u t C 4 · ln ( T + 65 ) C 5 · ln ( H ) ) C 8 · ln ( ( H · V o u t ) ) 5.10.99712
19 C 2 · exp ( C 3 · V o u t C 4 · ln ( T + 65 ) C 5 · ln ( H ) ) C 7 · ln ( ( T + 65 ) · V o u t )
C 8 · ln ( ( H · V o u t ) )
14.80.97715
20 C 1 + C 2 · exp ( C 3 · V o u t C 4 · ln ( T + 65 ) C 5 · ln ( H ) ) C 7 · ln ( ( T + 65 ) · V o u t )
C 8 · ln ( ( H · V o u t ) )
5.090.99716
21 C 1 + C 2 · exp ( C 3 · V o u t C 4 · ln ( T + 273.15 ) C 5 · ln ( H + 50 ) ) C 6 · ln ( H + 50 ) ) · ln ( V o u t )
C 7 · ln ( ( T + 273.15 ) · V o u t ) C 8 · ln ( T + 273.15 ) · ln ( H + 50 ) )
4.50.99823
22 C 1 + C 2 · exp ( C 3 · V o u t C 4 · ln ( T + 273.15 ) C 5 · ln ( H + 0 ) ) C 6 · ln ( H + 0 ) ) · ln ( V o u t )
C 7 · ln ( ( T + 273.15 ) · V o u t ) C 8 · ln ( T + 273.15 ) · ln ( H + 0 ) )
4.790.99820
Table 5. Coefficients and related statistical measures for model Equation (16) following calibration with experimental data.
Table 5. Coefficients and related statistical measures for model Equation (16) following calibration with experimental data.
EstimateStandard Errort-Statisticp-Value
C 1 −1370116.08−11.804.2 × 10−32
C 2 4081.47.335556.430
C 3 0.11090.008812.592.8 × 10−36
C 4 0.21520.017012.641.4 × 10−36
C 5 0.08080.006512.508.3 × 10−36
C 6 −0.05870.0047−12.554.6 × 10−36
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Mitchell, H.L.; Cox, S.J.; Lewis, H.G. Calibration of a Low-Cost Methane Sensor Using Machine Learning. Sensors 2024, 24, 1066. https://doi.org/10.3390/s24041066

AMA Style

Mitchell HL, Cox SJ, Lewis HG. Calibration of a Low-Cost Methane Sensor Using Machine Learning. Sensors. 2024; 24(4):1066. https://doi.org/10.3390/s24041066

Chicago/Turabian Style

Mitchell, Hazel Louise, Simon J. Cox, and Hugh G. Lewis. 2024. "Calibration of a Low-Cost Methane Sensor Using Machine Learning" Sensors 24, no. 4: 1066. https://doi.org/10.3390/s24041066

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop