Microwave Sensor Design for Prediction and Classification of Critical Water Contaminants Using the Decision-Tree-Based Support Vector Machine Approach
Planar microwave sensor, Machine learning, Relative permittivity of liquids, Water quality sensing.
The deterioration of water quality in rivers and lakes has intensified due to the increasing discharge of chemical contaminants from industrial, agricultural, and urban activities. Compounds such as nitrates, phosphates, ammonium, glucose, and heavy metals pose serious threats to the environment and public health. Conventional monitoring methods, while accurate, involve high costs, reliance on specialized laboratories, and challenges in large-scale deployment, which motivates the search for more affordable, reusable, and autonomous alternatives. In this context, this work investigates planar microwave sensors developed using microstrip technology and employing Defect Ground Structure (DGS) topologies. Four devices operating in the 1–3 GHz frequency range were designed and fabricated, evaluated through equivalent circuit models, electromagnetic simulations in ANSYS HFSS®, and laboratory experiments. Two novel microwave sensor topologies are proposed for detecting critical contaminants such as nitrates, phosphates, ammonium, glucose, and water conductivity. Four final sensor prototypes were developed, each operating at distinct resonance frequencies. Sensor 01 operates in the ISM (Industrial, Scientific, and Medical) band at 2.45 GHz for glucose concentrations above 50 mg/dL, and within 2.22–2.24 GHz for concentrations up to 20 mg/dL. Sensors 02 and 03 provide a comparative analysis with microwave sensors based on CSRR structures commonly found in the literature, operating in the mobile communications band at 1.5 GHz. Sensor 04 employs an interdigital capacitor (IDC) as its DGS structure, resonating at 2.0 GHz within the S-band, widely used in radiofrequency circuits. The dielectric properties of the samples were characterized using the Nicolson-Ross-Weir method, enabling the construction of a dataset from the sensors’ frequency responses. Based on this dataset, supervised machine learning techniques were applied in two directions: (i) regression, to approximate the real relative permittivity as a function of frequency using models such as Linear Regression, Polynomial Regression, MLP, Decision Tree, and Random Forest; and (ii) classification, to identify contaminants at different concentrations in distilled water, nitrate, and phosphate, employing Logistic Regression, Decision Tree, Random Forest, SVM, MLP, K-Nearest Neighbors (KNN), and Naive Bayes. Classifier evaluation was performed using ROC curves, confusion matrices, and metrics such as accuracy, precision, F1-score, and recall, with cross-validation through Leave-One-Out, Stratified K-Fold, and Repeated Stratified K-Fold methods. The results demonstrated strong agreement between simulation and experimental measurements, as well as high performance of the machine learning models, above 90%, in both permittivity prediction and contaminant classification. Furthermore, the effectiveness of the sensors was benchmarked against previous studies, confirming the reliability and efficiency of the developed devices. Ultimately, this work makes a significant contribution to advancing mobile water contaminant monitoring within the 1–3 GHz frequency range.