Combination of Machine Learning and RGB Sensors to Quantify and Classify Water Turbidity

Lorena Parra,Ali Ahmad,Sandra Sendra,Jaime Lloret,Pascal Lorenz
DOI: https://doi.org/10.3390/chemosensors12030034
2024-02-24
Chemosensors
Abstract:Turbidity is one of the crucial parameters of water quality. Even though many commercial devices, low-cost sensors, and remote sensing data can efficiently quantify turbidity, they are not valid tools for the classification it. In this paper, we design, calibrate, and test a novel optical low-cost sensor for turbidity quantification and classification. The sensor is based on an RGB light source and a light detector. The analyzed samples are characterized by turbidity values from 0.02 to 60 NTUs, and have four different sources. These samples were generated to represent natural turbidity sources and leaves in the marine areas close to agricultural lands. The data are gathered using 64 different combinations of light, generating complex matrix data. Machine learning models are compared to analyze this data, including training, validation, and test datasets. Moreover, different alternatives for data preprocessing and feature selection are assessed. Concerning the quantification of turbidity, the best results were obtained using averaged data and principal components analyses in conjunction with exponential gaussian process regression, achieving an R2 of 0.979. Regarding the classification of the turbidity, an accuracy of 91.23% is obtained with the fine K-Nearest-Neighbor classifier. The cases in which data were misclassified are characterized by turbidity values lower than 5 NTUs. The obtained results represent an improvement over the current solutions in terms of turbidity quantification and a completely novel approach to turbidity classification.
chemistry, analytical,electrochemistry,instruments & instrumentation
What problem does this paper attempt to address?
The paper attempts to address the problem of designing, calibrating, and testing a new low-cost optical sensor for quantifying and classifying water turbidity. Specifically, the paper focuses on monitoring low turbidity levels, aiming to provide a suitable tool for monitoring marine areas. Samples with different turbidity values (ranging from 0.02 to 60 NTUs) were generated in the study, representing natural turbidity sources in waters near agricultural areas. Additionally, the paper utilizes machine learning models to analyze these data and compares different data preprocessing and feature selection methods. In terms of turbidity quantification, the best results (R² = 0.979) were achieved using a combination of mean data and principal component analysis with exponential Gaussian process regression. For turbidity classification, an accuracy of 91.23% was achieved using a fine K-nearest neighbors classifier. The main contribution of the paper is the proposal of a new operating principle to generate light of different intensities and colors, the evaluation of the most suitable LDR condition circuit, and the introduction of machine learning techniques to quantify and classify turbidity values.