DOI: 10.3390/s26216718 ISSN: 1424-8220

Software-Based Relative Humidity Compensation for Low-Cost Optical PM Sensors Using Machine Learning: A Case Study from Upper Silesia, Poland

Patryk Sitarek, Krzysztof Emerling, Katarzyna Schmidt

High relative humidity (RH>60%) significantly impairs the accuracy of low-cost optical particulate matter (PM) sensors due to hygroscopic aerosol growth and water droplet interference. Physical heating elements evaporate condensed water but introduce substantial power consumption that limits low-power IoT operation. This study evaluates a software-based relative humidity compensation approach designed to mathematically emulate the output of a physically heated optical sensor using an unheated sensor paired with ambient meteorological parameters (T, RH, P) across 48,860 10-min records in Upper Silesia, Poland. We benchmarked six machine learning algorithms, Polynomial Regression (PR), Decision Trees (DTs), Support Vector Regressor (SVR), Dense Neural Networks (DNNs), and Long Short-Term Memory (LSTM) networks, against a co-located, heated SDS011 target sensor across both predictive accuracy and full computational profiling (tuning time, training duration, and inference latency). Static non-linear models achieved superior performance, with sixth-degree PR, SVR and DNN reaching R2=94%, MAE=1.41–1.61μg/m3, and RMSE=3.69–3.79μg/m3 for PM2.5, whereas complex LSTM networks performed substantially worse (R2=88%, MAE=2.56μg/m3, RMSE=5.33μg/m3). Computational profiling revealed that static models require negligible inference latencies (0.0002–0.0011ms/sample) and low tuning times (0.004s/fit for Decision Trees), whereas LSTM incurs an inference delay of 0.1215ms/sample (>500× slower) and heavy tuning overhead (148.96s/fit). These findings demonstrate that instantaneous non-linear relationships dominate humidity artifacts, confirming that lightweight software compensation can emulate the effect of hardware heaters on resource-constrained microcontrollers without deep learning overhead.

More from our Archive