Detection of Water pH Using Visible Near-Infrared Spectroscopy and One-Dimensional Convolutional Neural Network

Sensors (Basel). 2022 Aug 3;22(15):5809. doi: 10.3390/s22155809.

Abstract

pH is an important parameter for water quality detection. This study proposed a novel calibration regression strategy based on a one-dimensional convolutional neural network (1D-CNN) for water pH detection using visible near-infrared (Vis-NIR) spectroscopy. Two groups of Vis-NIR spectral analysis experiments of water pH detection were employed to evaluate the performance of 1D-CNN. Two conventional multivariate regression calibration methods, including partial least squares (PLS) and least squares support vector machine (LS-SVM), were introduced for comparative analysis with 1D-CNN. The successive projections algorithm (SPA) was adopted to select the feature variables. In addition, the learning mechanism of 1D-CNN was interpreted through visual feature maps by convolutional layers. The results showed that the 1D-CNN models obtained the highest prediction accuracy based on full spectra for the two experiments. For the spectrophotometer experiment, the root mean square error of prediction (RMSEP) was 0.7925, and the determination coefficient of prediction (Rp2) was 0.8515. For the grating spectrograph experiment, the RMSEP was 0.5128 and the Rp2 was 0.9273. The convolutional layers could automatically preprocess the spectra and effectively extract the spectra features. Compared with the traditional regression methods, 1D-CNN does not need complex spectra pretreatment and variable selection. Therefore, 1D-CNN is a promising regression approach, with higher prediction accuracy and better modeling convenience for rapid water pH detection using Vis-NIR spectroscopy.

Keywords: multivariate regression calibration; near-infrared; one-dimensional convolutional neural network; pH detection; visible.

MeSH terms

  • Hydrogen-Ion Concentration
  • Least-Squares Analysis
  • Neural Networks, Computer*
  • Spectroscopy, Near-Infrared* / methods
  • Support Vector Machine