E-Nose: Time–Frequency Attention Convolutional Neural Network for Gas Classification and Concentration Prediction

Minglv Jiang, Na Li, Mingyong Li, Zhou Wang, Yuan Tian, Kaiyan Peng, Haoran Sheng, Haoyu Li, Qiang LiSensors 2024 · DOI

TL;DR

This paper introduces a novel Time-Frequency Attention Convolutional Neural Network (TFA-CNN) for electronic nose (E-nose) systems, significantly improving gas classification and concentration prediction. By effectively integrating temporal and frequency domain information and employing a new data augmentation strategy, the TFA-CNN achieves near-perfect accuracy for gas identification and highly accurate concentration predictions.

What Problem Does This Paper Address?

Electronic nose (E-nose) systems, designed to mimic the human sense of smell, are valuable for applications ranging from environmental monitoring to food quality assessment. However, accurately identifying gas types and predicting their concentrations remains a significant challenge. Traditional methods often struggle with sensor drift, redundant information, and the complex interplay of temporal and frequency characteristics within E-nose signals. This paper aims to overcome these limitations by developing a more robust and accurate E-nose system that can effectively learn from and interpret these complex signals.

Methods

The core innovation is the Time-Frequency Attention (TFA) block, which is integrated into a Convolutional Neural Network (CNN) architecture. This block is designed to:

  • Extract both temporal and frequency domain information: It uses Discrete Cosine Transform (DCT) to convert time-domain signals into the frequency domain, which is computationally efficient and less prone to noise than Fourier Transforms. Maxpooling is used on time-domain signals to highlight long-term trends.
  • Integrate information adaptively: The TFA block uses attention mechanisms to learn the relative importance of features from both time and frequency domains, allowing the model to focus on the most informative aspects of the E-nose signals.
  • Expand receptive field (RF): The network incorporates an Omni-scale block (OS-block) to ensure that the model can capture features across various time scales, which is crucial for understanding complex signal patterns.

Additionally, a novel data augmentation strategy is introduced, combining:

  • Channel Masking: Simulates sensor drift by randomly masking channels, forcing the model to be robust to partial information loss.
  • Time Masking: Randomly hides parts of the time series, reducing dependence on irrelevant features and improving adaptability to corrupted data.
  • Window Slicing (WS): Extracts shorter, continuous segments of signals to focus on local dependencies and improve efficiency.

The model is trained using a multi-task learning (MTL) approach, simultaneously optimizing for both classification and regression tasks, sharing parameters to improve efficiency and performance.

Datasets

The study utilized data from four independently prepared metal-oxide-semiconductor gas sensors with varying In2O3:SnO2 ratios. Five target gases (ethanol, acetone, methanol, nitrogen dioxide, and sulfur dioxide) were tested across a concentration range of 7.5 ppm to 75.0 ppm. The initial dataset comprised over 50,000 data points. For evaluation, the data was split into training and testing sets (4:1 ratio). Data augmentation was applied to the training set, expanding it tenfold. An independent validation experiment was also conducted using a smaller, distinct dataset of 45 samples covering three gases at different concentration ranges.

Key Insights and Ideas

  • Time-frequency fusion is key: Simply analyzing time or frequency domains in isolation is insufficient. The TFA block's ability to adaptively fuse these domains is critical for accurate E-nose performance.
  • DCT is a strong alternative to FT: Using DCT for frequency transformation offers computational advantages and better noise resilience, making it suitable for real-time E-nose applications.
  • Data augmentation is crucial for robustness: The proposed channel and time masking, along with window slicing, significantly improves the model's ability to handle real-world challenges like sensor drift and incomplete data.
  • MTL simplifies and enhances performance: Training classification and regression tasks simultaneously within a single network architecture is more efficient and leads to better overall results.
  • Receptive field matters for time series: The OS-block's ability to capture features across multiple scales is essential for understanding the temporal dynamics of E-nose signals.

Key Results

  • Classification Accuracy: The TFA-CNN achieved a perfect 100% accuracy for gas type recognition on the testing set.
  • Concentration Prediction:
    • Coefficient of Determination (R²): 0.99
    • Pearson Correlation Coefficient (r): 0.99
    • Mean Absolute Error (MAE): 1.54 ppm (on the main dataset) and 1.39 ppm (on experimental test results).
  • Ablation Studies: Removing the TF-attention block significantly degraded performance, highlighting its importance. Data augmentation strategies also proved vital, with the absence of any augmentation leading to a substantial increase in MAE and decrease in R² and r.
  • Independent Validation: The fine-tuned TFA-CNN demonstrated excellent generalization on unseen concentration ranges, achieving 100% classification accuracy and an MAE of 1.386 ppm.

Limitations and Future Work

  • Sensor Drift Handling: While the data augmentation simulates drift, the paper acknowledges that drift might not occur uniformly across all sensors in an array, suggesting potential for further refinement in drift compensation strategies.
  • Low Concentration Accuracy: The paper notes that prediction accuracy can decrease in low concentration intervals compared to higher ones. This is attributed to less significant or linear sensor responses at low concentrations and potential sampling bias. Future work could focus on developing more sensitive methods for low-concentration detection.
  • Generalizability to New Gases: While the model performs well on unseen concentrations of known gases, its performance on entirely new gas types was not explicitly tested. Future research could explore transfer learning or few-shot learning approaches for adapting to novel gas compositions.

Summary updated

Abstract

In the electronic nose (E-nose) systems, gas type recognition and accurate concentration prediction are some of the most challenging issues. This study introduced an innovative pattern recognition method of time-frequency attention convolutional neural network (TFA-CNN). A time-frequency attention block was designed in the network, aiming to excavate and effectively integrate the temporal and frequency domain information in the E-nose signals to enhance the performance of gas classification and concentration prediction tasks. Additionally, a novel data augmentation strategy was developed, manipulating the feature channels and time dimensions to reduce the interference of sensor drift and redundant information, thereby enhancing the model's robustness and adaptability. Utilizing two types of metal-oxide-semiconductor gas sensors, this research conducted qualitative and quantitative analysis on five target gases. The evaluation results showed that the classification accuracy could reach 100%, and the coefficient of the determination (<i>R</i><sup>2</sup>) score of the regression task was up to 0.99. The Pearson correlation coefficient (<i>r</i>) was 0.99, and the mean absolute error (MAE) was 1.54 ppm. The experimental test results were almost consistent with the system predictions, and the MAE was 1.39 ppm. This study provides a method of network learning that combines time-frequency domain information, exhibiting high performance in gas classification and concentration prediction within the E-nose system.
BibTeX
@inproceedings{jiang2024e,
  author = {Minglv Jiang and Na Li and Mingyong Li and Zhou Wang and Yuan Tian and Kaiyan Peng and Haoran Sheng and Haoyu Li and Qiang Li},
  title = {{E-Nose: Time–Frequency Attention Convolutional Neural Network for Gas Classification and Concentration Prediction}},
  booktitle = {Sensors},
  year = {2024},
  doi = {10.3390/s24134126},
}
Figure