Real-Time AQI Forecasting Using Environmental Sensors and Machine Learning Models on Edge Devices
International Journal of Computer Science (IJCS) Published by SK Research Group of Companies (SKRGC)
Download this PDF format
Abstract
Concerns about environmental air quality and its direct implications on health have driven innovations in both monitoring and predictive technologies. This paper explores the integration of Internet of Things (IoT) systems for analyzing environmental parameters such as temperature, humidity, PM10, and PM2.5 to forecast the Air Quality Index (AQI). The dataset comprises 5869 entries and encompasses six essential features used for precise AQI forecasting. Sensor data are transmitted to the Thing Speak cloud for storage and preliminary evaluation. Prediction is carried out using TensorFlow-based regression models, offering near-instantaneous insights. The synergy of IoT and machine learning improves both precision and responsiveness, which is vital for environmental control and public health. The study contrasts the performance of feedforward neural networks trained with 'Adam' and 'RMSprop' optimizers across various training epochs, along with random forest algorithms using multiple estimators. Both linear regression and random forest models were tested, and results show high accuracy with predictions closely matching actual AQI values. Notably, the random forest model with 100 estimators achieved the best performance, recording the lowest Mean Absolute Errors—0.2785 for AQI 10 and 0.2483 for AQI 2.5. This solution effectively pinpoints pollution hotspots and equips decision-makers with tools for prompt response and pollution control.
References
1. A. M. Madakam, R. Ramaswamy, and S. Tripathi, “Internet of Things (IoT): A literature review,” J. Comput. Commun., vol. 3, no. 5, pp. 164–173, 2015.
2. World Health Organization, “Ambient (outdoor) air pollution,” 2021. [Online]. Available: https://www.who.int/news-room/fact-sheets/detail/ambient-(outdoor)-air-quality-and-health
3. World Health Organization, “Air pollution,” 2022. [Online]. Available: https://www.who.int/health-topics/air-pollution
4. S. Vardoulakis et al., “Health effects of air pollution,” BMJ, vol. 371, m4472, 2020.
5. M. Hasenfratz et al., “Participatory air pollution monitoring using smartphones,” Mobile Sensing, 2012.
6. P. B. Dhande and M. M. Joshi, “Review of IoT applications in environmental monitoring,” Int. J. Comput. Appl., vol. 180, no. 44, pp. 1–4, 2018.
7. R. Bhatia and A. Verma, “IoT based air pollution monitoring and forecasting system,” Int. J. Comput. Sci. Mob. Comput., vol. 7, no. 6, pp. 376–380, 2018.
8. A. L. Pope and D. W. Dockery, “Health effects of fine particulate air pollution: Lines that connect,” J. Air Waste Manage. Assoc., vol. 56, no. 6, pp. 709–742, 2006.
9. R. K. Sharma, A. Suryawanshi, and A. S. Chavan, “Air pollution monitoring using IoT,” Int. J. Sci. Eng. Res., vol. 8, no. 5, pp. 250–254, 2017.
10. J. R. Kumar and M. N. S. Swamy, “IoT-based air pollution monitoring and forecasting system using AI,” Procedia Comput. Sci., vol. 171, pp. 2321–2328, 2020.
11. M. A. Khan et al., “IoT-based air quality monitoring system using machine learning,” Sustain. Comput. Informatics Syst., vol. 28, 100433, 2020.
12. N. K. Sharma and R. K. Rajput, “Machine learning in air pollution monitoring and forecasting: A review,” Air Qual. Atmos. Health, vol. 13, pp. 813–827, 2020.
13. F. Bonomi, R. Milito, J. Zhu, and S. Addepalli, “Fog computing and its role in the Internet of Things,” in Proc. MCC Workshop on Mobile Cloud Comput., Helsinki, Finland, 2012, pp. 13–16.
14. H. Kulkarni, “Air pollution monitoring using IoT and machine learning,” Int. J. Innov. Res. Comput. Commun. Eng., vol. 5, no. 2, pp. 345–351, 2017.
15. N. Dehkordi, F. T. Shahandashti, and S. Shekhar, “A review of indoor air quality monitoring systems for smart buildings,” Build. Environ., vol. 223, 109338, 2022.
16. K. Sai, M. Pradeep, and S. Rohit, “Low-cost IoT based air quality monitoring system,” Int. J. Eng. Trends Technol., vol. 67, no. 4, pp. 206–211, 2019.
17. N. Karnati, “Big data analytics and machine learning in IoT-based air pollution monitoring,” Procedia Comput. Sci., vol. 132, pp. 734–739, 2018.
18. S. P. Mohanty et al., “Application of IoT and big data analytics in urban air quality monitoring: A survey,” IEEE Internet Things J., vol. 9, no. 2, pp. 1058–1073, 2022.
19. Y. Al Horr et al., “Impact of indoor environmental quality on occupant well-being and performance,” Build. Environ., vol. 93, pp. 10–33, 2015.
20. Y. Zhang, X. Li, and H. Wang, “Indoor particulate pollution and its health impacts in urban households,” Atmos. Environ., vol. 212, pp. 145–159, 2019.
21. A. L. Pope and D. W. Dockery, “Health effects of fine particulate air pollution: Lines that connect,” J. Air Waste Manage. Assoc., vol. 56, no. 6, pp. 709–742, 2006.
22. P. Gope, S. Dawn, and A. Das, “COVID-19 lockdown and improvement of air quality in India,” Environ. Dev. Sustain., vol. 23, pp. 7041–7058, 2021.
23. S. Sharma et al., “Effect of restricted emissions during COVID-19 on air quality in India,” Sci. Total Environ., vol. 728, 138878, 2020.
24. M. Bauwens et al., “Impact of coronavirus outbreak on NO2 pollution assessed using TROPOMI and OMI observations,” Geophys. Res. Lett., vol. 47, no. 11, e2020GL087978, 2020.
25. J. D. Spengler and K. Sexton, “Indoor air pollution: A public health perspective,” Science, vol. 221, no. 4605, pp. 9–17, 1983.
26. A. Biviano et al., “Smart cities and IoT: A monitoring network for Salerno,” in Proc. Int. Conf. Smart Cities, 2018, pp. 119–126.
27. M. Frontczak and P. Wargocki, “Literature survey on how different factors influence human comfort in indoor environments,” Build. Environ., vol. 46, no. 4, pp. 922–937, 2011.
28. Raspberry Pi Foundation, “Raspberry Pi 4 Model B,” 2020. [Online]. Available: https://www.raspberrypi.org/products/raspberry-pi-4-model-b/
29. Texas Instruments, “TMP117: High-accuracy digital temperature sensor,” 2021. [Online]. Available: https://www.ti.com/product/TMP117
30. Honeywell, “HIH-4030 Series Humidity Sensors,” 2017. [Online]. Available: https://sensing.honeywell.com/hih-4030
31. Texas Instruments, “ADS1015 12-Bit ADC,” 2020. [Online]. Available: https://www.ti.com/product/ADS1015
32. Nova Fitness Co., “SDS011 Laser Dust Sensor,” 2019. [Online]. Available: https://aqicn.org/sensor/sds011/
33. A. C. Baranov, “python-aqi: Python module to convert pollutant concentrations to AQI,” 2021. [Online]. Available: https://pypi.org/project/python-aqi/
34. United States Environmental Protection Agency (EPA), “Technical Assistance Document for the Reporting of Daily Air Quality – the AQI,” 2016.
35. United States EPA, “National Ambient Air Quality Standards (NAAQS),” 2020. [Online]. Available: https://www.epa.gov/naaqs
36. MathWorks, “ThingSpeak IoT Platform,” 2021. [Online]. Available: https://thingspeak.com/
37. M. Abadi et al., “TensorFlow: Large-scale machine learning on heterogeneous systems,” 2016. [Online]. Available: https://www.tensorflow.org/
38. D. C. Montgomery, E. A. Peck, and G. G. Vining, Introduction to Linear Regression Analysis, 5th ed., Wiley, 2012.
39. I. Guyon and A. Elisseeff, “An introduction to variable and feature selection,” J. Mach. Learn. Res., vol. 3, pp. 1157–1182, 2003.
40. J. Friedman, T. Hastie, and R. Tibshirani, The Elements of Statistical Learning, 2nd ed., Springer, 2009.
41. L. Breiman, “Random forests,” Mach. Learn., vol. 45, no. 1, pp. 5–32, 2001.
42. K. A. Bollen and R. Lennox, “Conventional wisdom on measurement: A structural equation perspective,” Psychol. Bull., vol. 110, no. 2, pp. 305–314, 1991.
43. C. Bishop, Pattern Recognition and Machine Learning, Springer, 2006.
44. A. Géron, Hands-On Machine Learning with Scikit-Learn and TensorFlow, O’Reilly Media, 2017.
45. R. J. Hyndman and A. B. Koehler, “Another look at measures of forecast accuracy,” Int. J. Forecast., vol. 22, no. 4, pp. 679–688, 2006.
46. A. L. Maas, A. Y. Hannun, and A. Y. Ng, “Rectifier nonlinearities improve neural network acoustic models,” in Proc. ICML, 2013.
47. S. Makridakis, E. Spiliotis, and V. Assimakopoulos, “Statistical and machine learning forecasting methods: Concerns and ways forward,” PLoS ONE, vol. 13, no. 3, e0194889, 2018.
Keywords
Internet of Things; Forecasting; Machine Learning; Environmental Sensors; Air Quality Index; Public Health;