Air quality measurement, prediction and warning using transfer learning based IOT system for ambient assisted living

Shilpa Sonawani (Department of Computer Engineering, Vishwakarma University, Pune, India)
Kailas Patil (Department of Computer Engineering, Vishwakarma University, Pune, India)

International Journal of Pervasive Computing and Communications

ISSN: 1742-7371

Article publication date: 4 January 2023

Issue publication date: 4 January 2024

322

Abstract

Purpose

Indoor air quality monitoring is extremely important in urban, industrial areas. Considering the devastating effect of declining quality of air in major part of the countries like India and China, it is highly recommended to monitor the quality of air which can help people with respiratory diseases, children and elderly people to take necessary precautions and stay safe at their homes. The purpose of this study is to detect air quality and perform predictions which could be part of smart home automation with the use of newer technology.

Design/methodology/approach

This study proposes an Internet-of-Things (IoT)-based air quality measurement, warning and prediction system for ambient assisted living. The proposed ambient assisted living system consists of low-cost air quality sensors and ESP32 controller with new generation embedded system architecture. It can detect Indoor Air Quality parameters like CO, PM2.5, NO2, O3, NH3, temperature, pressure, humidity, etc. The low cost sensor data are calibrated using machine learning techniques for performance improvement. The system has a novel prediction model, multiheaded convolutional neural networks-gated recurrent unit which can detect next hour pollution concentration. The model uses a transfer learning (TL) approach for prediction when the system is new and less data available for prediction. Any neighboring site data can be used to transfer knowledge for early predictions for the new system. It can have a mobile-based application which can send warning notifications to users if the Indoor Air Quality parameters exceed the specified threshold values. This is all required to take necessary measures against bad air quality.

Findings

The IoT-based system has implemented the TL framework, and the results of this study showed that the system works efficiently with performance improvement of 55.42% in RMSE scores for prediction at new target system with insufficient data.

Originality/value

This study demonstrates the implementation of an IoT system which uses low-cost sensors and deep learning model for predicting pollution concentration. The system is tackling the issues of the low-cost sensors for better performance. The novel approach of pretrained models and TL work very well at the new system having data insufficiency issues. This study contributes significantly with the usage of low-cost sensors, open-source advanced technology and performance improvement in prediction ability at new systems. Experimental results and findings are disclosed in this study. This will help install multiple new cost-effective monitoring stations in smart city for pollution forecasting.

Keywords

Citation

Sonawani, S. and Patil, K. (2024), "Air quality measurement, prediction and warning using transfer learning based IOT system for ambient assisted living", International Journal of Pervasive Computing and Communications, Vol. 20 No. 1, pp. 38-55. https://doi.org/10.1108/IJPCC-07-2022-0271

Publisher

:

Emerald Publishing Limited

Copyright © 2022, Emerald Publishing Limited


1. Introduction

Environmental pollution is a matter of concern these days because of increased level of pollution because of urbanization, growth in civilization, industries and automobiles. Air pollution is most dangerous and severe among different types of pollutions like, water, soil, noise, thermal, responsible for climate change and life-threatening (Zhu et al., 2021) diseases. According to WHO, 7 million people every year die because of air pollution worldwide (World Health Organization, 2018; Rout et al., 2018), and 90% of the population is breathing polluted air. Air pollution is highly responsible for heart diseases, respiratory diseases, lung cancer, having bad effect on human health (Mazutti et al., 2020) and earth’s ecosystem. Many urban areas do not satisfy guidelines and limits set by WHO (WHO, 2019). According to US Environmental Protection Agency, indoor pollutant level is 100% higher than the outdoor (Seguel et al., 2017) pollution level. Elderly people, children and newborns stay for maximum time at home. Also, many indoor activities like cooking, smoking and cleaning add to the bad air quality at home. People at home may get exposed to the harmful gases like carbon dioxide (CO2), nitrogen dioxide (NO2), carbon monoxide (CO), Ammonia (NH3), particulate matter (PM), volatile organic compounds (VOC), causing oxygen deficiency and other health effects (Cho et al., 2017). To support better living of people with disabilities and staying at home, individuals with illness and children, ambient assisted living (AAL) systems are designed which can monitor air quality in and around the building. Most commonly, the Indoor Air Quality (IAQ) is required to be measured in residential buildings, hospitals, school buildings and office buildings.

With the advancements in the technology in smart city environment, the pollution data can be gathered from various locations. The air quality sensors with affordable low cost with smaller size are available now. They can be mounted on any building and can be used to measure pollution levels and also perform the predictions. They can also be used on google map and can be warned for the pollution level in the targeted areas. Even, smart wearable can be connected to the smart monitoring systems for finding air pollution levels and their predictions. Smart city infrastructure can be well developed by using advanced technology for technical evolution. The smart sensor-based air quality monitoring systems can deliver services faster without waiting for large data to be collected for training the model. This bottleneck can be handled using transfer learning (TL) methodologies. Building multiple air quality monitoring systems with cost effective Internet-of-Things (IoT) sensors is very demanding. Low performance of these sensors because of sensitivity to environmental factors is another issue of performance degradation which can be well tackled by calibrating these sensor data. Moreover, there is a lack of research on creating pretrained models for air quality predictions and their usage for transferring knowledge to new air quality monitoring systems with insufficient data available.

Some of the existing works have been done on PM2.5 concentration prediction using IoT-enabled and edge computing-based system. This system was experimented on PC for cloud prediction and a Raspberry Pi for edge devices’ prediction (Moursi et al., 2021). Recurrent neural network is proposed to analyze IoT smart city data of SO2 and NO2 gasses at various locations in Chennai (Sardar Maran et al., 2021). Another study proposed IoT system which is prototype of a large-scale system. The data is stored on cloud environment, and analysis is performed to forecast possible diseases. Machine learning models are used here (Rajasekar et al., 2020). Recently, need for IoT-based cloud-enabled applications for smart cities is increased dramatically. Air quality measurement and forecasting is a multivariate time series application. Deep learning models work very good for time-series applications and can capture useful patterns and trends. Newly developed monitoring stations lack in collecting huge amounts of data which can become the hurdle for the model to get accurate predictions. Deep learning for IoT-based systems opens the door for research developments.

In this paper, we proposed a TL approach to solve data insufficiency problem at new Air Quality Monitoring (AQM) system. This work demonstrates the implementation of IoT system which uses low-cost sensors. Low-cost sensors fail to attain sufficient performance. This work tackles the issue, and the novel approach of pretrained models work very well for the new system performance improvement in predicting pollution levels. Experimental results were carried out and disclosed the findings in the paper. The contributions of this research work are summarized as follows:

  1. The study proposes a framework for AQM station building for indoor environment using TL approach.

  2. The study proposes a deep learning model, multiheaded convolutional neural networks-gated recurrent unit (CNN-GRU) for pollution concentration prediction.

  3. This study uses O3, NH3, NO2, CO, PM2.5, temperature and pressure, humidity, altitude sensors for IAQ implementation and monitoring.

  4. The system generated data has major beneficiaries as researchers who are working in air pollution monitoring using low-cost sensors. The data is available to the public. The data can be used by researchers in several fields:

    • researchers interested in evaluating indoor ozone, ammonia, nitrogen dioxide, carbon monoxide and particulate matter pollutants;

    • researchers interested in experimenting machine learning and advanced deep learning algorithms for low-cost sensor data; and

    • researchers interested in applying and experimenting calibration algorithms on low-cost sensor data.

  5. The generated data set would be useful for the policymakers and environmentalists who want to design the policies and find science-based solutions to mitigate impacts of air pollution in smart cities.

The paper is organized as follows: Section 1 gives overview of the need for air pollution monitoring and prediction system. Section 2 specifies related work done in this domain. Section 3 proposes the IoT measurement, prediction and warning system. Section 4 describes the data collection methodology at the system. Section 5 briefs on low-cost sensor calibration. Section 6 explains the TL process. Section 7 shows experimentation performed along with data preprocessing and model building. Section 8 shows results and discussion. Section 9 concludes the paper work.

2. Related work

Predicting air pollution concentration is a matter of concern, and in this regard, various works have been proposed. An extreme learning machine-based (Jiangshe et al., 2017)approach is proposed to predict the concentration of air pollution in two of locations in Hong Kong. Deep neural network is applied to predict PM2.5 using auto-encoder as a pretrained model in Japan (Bun Theang et al., 2016). Artificial Neural Network (ANN) is used to measure SO2 concentration in Delhi (Chelani et al., 2002). Principal component analysis (Sousa et al., 2007) and ANN are used to predict O3 concentration. Co-training approach using semi-supervised learning is proposed which uses two classifiers, one is ANN and other is linear-chain Conditional Random Field (Zheng et al., 2013). Deep Neural Network coupled with cloud computing (Altamirano-Astorga et al., 2022) is used to predict indoor air quality. Many deep learning models for timeseries data such as recurrent neural networks and Long short-term memory are widely used models for air quality forecasting (Salman et al., 2018; Tsai et al., 2018).

Indoor air pollution is a major concern for children and elderly people at home, and (Kim, 2022) it is caused by gases like O3, NH3, NO2, CO and PM2.5. Maintaining the pollution level low and identifying the causes is of concern. The common sources of CO emission are stoves, gas, gas appliances, leaking furnaces, wood stoves, dryers, fireplaces, chimneys and automobile exhausts (Derbez et al., 2018; Madureira et al., 2016). PM is found indoor from the emission from cooking, candles and combustion and may be migrated from outdoor environment (Leaffer et al., 2019; Slezakova et al., 2019). Major source of indoor NO2 is smoking and cooking and combustion heating (Hu et al., 2020). So commercial buildings and schools will find with less NO2 concentration. NH3 values vary greatly with the rooms and the season, as it has a correlation with humidity and temperature, human activity and central air conditioning. It has higher values in summer and lower values in winters (Zhang et al., 2021). It can reach as high as 1.43 ppm in toilets. A study shows that air purifiers produce O3 as a byproduct because of air ionization (Britigan et al., 2006). Air-conditioned rooms showed very low O3 concentration compared to rooms with open windows and fans (Lee et al., 2004). Ozone is a secondary pollutant, as it is generated through the chemical reactions between air pollutants like Volatile Organic Compounds (VOC) and nitrogen oxides in sunlight. It is produced because of laser printers, disinfectors, photocopiers and others indoor (BedBreeZzz, 2022) devices.

TL is a methodology which uses previously learned knowledge to solve new and similar problems (Jie Lu et al., 2015) by transferring the knowledge from known solutions effectively and efficiently. TL is very successful in computer vision applications (Subhalakshmi et al., 2021) like image recognition and object localization. It is rarely used in timeseries numerical data. Also, the concept of pretrained models can be very well used for knowledge transfer to other models for performance improvement (Reddy et al., 2021). Lot of work has been done in the IAQ as described in the review (Saini et al., 2020). It explained about IAQ monitoring and sensors, supervised learning and microcontrollers with sensors for data collection, air quality sensing preferred interface, communication technologies, power consumption and functionalities incorporated. This study was based on data from databases from 2015 to 2020. There could be various types of sensors for IoT measurement, thermal sensors, single gas sensors, multi-gas sensors and dust sensors. IoT-based technologies can be advanced with other technologies like fog computing for monitoring. Although they are facing lot of challenges and obstacles, the sensors selection for IAQ is based on crucial factors like cost, calibration requirement and hardware required at field implementation (Saini et al., 2020). None of the existing works have implemented and experimented the effect of transfer leaning for performance improvement in IoT-based systems to solve the data insufficiency problem at new station, considering calibration requirements for sensor data for performance improvement. This work is a sincere effort to tackle with these issues with experimentation and findings.

3. Implementing Internet-of-Things system for ambient assisted living for air quality measurement, prediction and warning

The proposed system is useful for children, elder people and patients with respiratory diseases who may spend lot of time indoors and vulnerable to indoor pollutants. The system uses ESP8266 NodeMCU controller module with built-in WiFi module. NodeMCU is an open source IoT platform, and it is low cost. It has support for the ESP32 32-bit MCU. The IoT-based AAL system developed is low cost. The system sends warning notifications to the user about all measuring pollutant gases concentrations, temperature and humidity and pressure parameters. All indoor measured parameters along with their severity as good, moderate and bad quality are displayed on a Web page/mobile application/LCD monitor. The implemented and experimented system is connected to Arduino Uno, an open-source microcontroller board. It is based on the Microchip ATmega328P microcontroller, having sets of digital and analog input/output pins for connecting to different expansion boards and circuits.

All the sensors for air pollution measurements and ESP8266 NodeMCU controller module are connected to Arduino Uno. ESP module fetches the data from Arduino Uno and passes it to the Web server which is on Raspberry pie. The server is configured here on raspberry pie for data storage for experimentation. This data would be used as a training data for learning the prediction model. The same data can be stored on cloud server if a cloud-based system is developed. The system also uses an LCD monitor to display pollutant measurements. The implementation of the IoT system for AQM is as shown in Figure 1, and the working of the system is as shown in Figure 2.

The system uses following sensors for the measurement of pollutants:

3.1 GP2Y1010AU0F PM2.5

It is a PM2.5 pollutant measurement sensor. It is designed to sense dust particles and an optical air quality sensor. The phototransistor and an infrared emitting diode are diagonally placed in this device by which it can detect the reflected light of dust in air. The sensor can be powered with up to 7 VDC and can have a very low current consumption (20 mA max and 11 mA typical). The analog voltage output of the sensor is proportional to the measured dust density which has a sensitivity of 0.5 V/0.1 mg/m3.

3.2 MiCS-6814

It measures NO2, NH3 and CO gases. Detection range: carbon monoxide, 1–1,000 ppm, nitrogen dioxide, 0.05–10 ppm, ammonia, 1–500 ppm, sensing resistance in air-CO-100 to 1,500 kW, NO2 0.8–20 kW, NH3 10–1,500 kW, sensitivity factor CO 12–50, No2-2, NH3 1.5–15. MiCS-681 can measure three gases simultaneously, as it has multi-channels. It can detect many unhealthful gases too and can help monitor the concentration of more than one gas.

3.3 MQ131

It is a semiconductor sensor for measuring ozone. SnO2 is a sensitive material of MQ131 gas sensor. It has lower conductivity when ozone gas exists in clean air. When the concentration is rising, the sensor’s conductivity is higher along with the gas.

3.4 BME 280

It is a temperature and humidity sensor. It is developed for wearables and mobile applications considering the size and low power consumption requirement. It is perfectly feasible for low current consumption, high EMC robustness and long-term stability, as the unit combines high accuracy sensors. Fast response time is offered by the sensor and, therefore, helps in performance requirements of the applications like context awareness.

4. Data collection

The remote mobile users can see analysis of the information of the pollutants, warnings if concentration values are going beyond thresholds and the predictions. The LCD monitor displays the current pollutant concentration levels. The raw data collected by the system contains 139,448 records from Nov 2020 to Dec 2021 stored on server. The statistics of the data collected is as shown in Table 1. This is all required to take necessary measures against bad air quality. The pollutant concentration thresholds for alerts are as shown in Table 2. The different pollutants measured are O3 in PPB, NH3 in PPM, NO2 in PPM, CO in PPM, PM2.5 in ug/m3, temperature in Celsius, pressure in hPa, altitude in ft and humidity in RH.

5. Low-cost sensor calibration

The measurement of concentration by low-cost sensors is highly influenced by environmental factors like temperature, humidity, indoor and outdoor environment. The low-cost sensors fail to attain sufficient performance, as they are more error-prone than high-end sensing infrastructures. One challenge with a low-cost sensor-based system is calibration of the system. The system needs to be calibrated with the nearby monitoring station or by using machine learning techniques. Machine learning algorithms (Han, 2021) can be used to overcome this problem. This study uses random forest regression (RFR) for calibration and validation of the measurements with nearby reference measurements. RFR has achieved good results and has been used in many studies for sensor data correction. The study by Zimmerman’s research (2018) on low-cost sensors data of the USA and Europe proves to accurately predict air pollution concentrations. Three algorithms, linear regression, random forest and support vector regression, were applied by Bigi et al. (2018) and observed that RFR is the best correction algorithm. Here, in the study, the nearby station is MIT-WPU, Kothrud, Pune, India (Shilpa Sonawani, 2021). Calibration using RFR for NO2 is with R2 value 0.97, with CO with R2 value 0.99 and with NH3 R2 value is 0.99. PM2.5 R2 value is 0.98 and O3 R2 value is 0.99.

6. Transfer learning

TL uses knowledge previously acquired to solve new problems efficiently. Prediction ability at new AQM system can be improved with the TL approach, although they lack in sufficient observed data for accurate prediction. The learning model at new AQM system can be trained by using the TL approach with the available learning from another nearby AQM station. The TL process is as shown in Figure 3. The components of the system are explained below:

6.1 Source base model generation

The prediction of the pollution concentration at AQM station is a multivariate time series prediction problem. Base model module is used to build a best-performing model architecture. The deep learning base model built is a multiheaded CNN-GRU model. In this architecture, each independent attribute is handled by a separate CNN, the outputs further merged together for processing by GRU layers. The separate CNN captures the temporal trends in the data efficiently. Finally, passing this output from GRU layer through two fully-connected dense layers results in a single-valued output in the end. The model architecture is as shown in Figure 4.

A raw pollution concentration data is preprocessed for missing values. The multiple feature data is scaled using minimum–maximum scaling and then converted to supervised learning series. This data generating is lagged observations (t – 1) and predicting current step (t). The features consider left to right order and predicts at the last right. This re-framed data in time steps can be given to convolution 1D which is applied to each attribute separately. Every convolution has hyper parameters set as filters = 64, kernel size = 2, strides = 1 and activation function = relu (Rectified Linear Units). Here, the filters are learned over time and not predefined. Kernel of size 2 is a window of size 2 when it is moving one cell ahead across 1D sample. The outputs which are 2D from all CNN are concatenated. This output is passed to GRU layer with 50 neurons and then to dense layer with 20 neurons and an activation function for single output. The relu activation function is used here, as it is efficient than sigmoid and tanh functions. Also, all the neurons are not activated at the same time using this function which is making it very popular in deep learning algorithms.

The prediction performance is assessed by calculating the root mean square error (RMSE), mean absolute error (MAE), mean square error (MSE) and R-square metrics as shown in equations (1), (2), (3) and (4). RMSE (Sayeg et al., 2014) gives error between actual and prediction value; smaller value gives better prediction. MAE is a magnitude of forecasting (Chuentawat et al., 2018). Smaller MAE value is expected for better performance. MSE gives closeness of fitted line actual data. For better, bit smaller MSE value is expected. Another metric used is R-square which shows trend in the data with value between 0 and 1. Larger value close to 1 gives the model ability to predict the trend. In the mathematical expressions given below, yi is observed value and yi’ is modelled value. SSregression is sum of squares after regression, and SStotal is total sum of squares.

(1) RMSE(y,y)=1ni=1n(yiXyi)2
(2) MAE(y,y)=1ni=1n|(yiXyi)|
(3) MSE(y,y)=1ni=1n(yiXyi)2
(4) RSquare = SSregression/SStotal

The model is compared with other deep learning models for its performance and multiheaded CNN-GRU model observed to achieve best RMSE score and, hence, used as a base model as shown in Table 3. The performance evaluation is performed on Changping Monitoring Station, Beijing city, China.

6.2 Knowledge transfer to target system

TL approach is training the model using source data set, and weights of this model are saved. The target data set can be finetuned using source data set weights. During the process, different freezing strategies can be used. Freezing layers at source station means the weights for these layers will not change when training at the target station is done. Finetuning is retraining at the target data with the chosen freezing strategy at the base model. The different freezing strategies can be used to evaluate model performance. Here, customization can be performed on higher layers to learn from target data set, as there is low similarity. The steps followed for experimentation are as follows:

  • A target data set can be denoted by Thourly which has hourly granularity.

  • With chosen train and test parameter sizes, the base model architecture is trained on the source data set, and the model loaded with the best weights is saved as .h5 file.

  • The pretrained model is loaded from the .h5 file, and different freezing strategies are used to transfer the patterns learned by the base model.

  • For each freezing strategy, the best weights learned by the model are saved through Model Checkpoint, loaded during testing, and the RMSE metric and goodness of fit are evaluated. Best weights create list of predictions for each test sample, and the results are averaged up for final model RMSE score.

In the proposed system, data is collected for few days, and the TL approach is applied to check for the model performance accuracy at the target system. The model weights at the target system are initialized with the pretrained model’s weights at another system for training, and prediction is performed which significantly can improve prediction at the target system.

7. Experimentation

7.1 Data preprocessing at base and target system

The data required at a base system is collected from the Central Pollution Control Board of Pune city in India. It has three years of data from 2016, 2017 and 2018 years. It contains missing values, and they are handled by replacing with feed-forward values (Sonawani et al., 2022). The data set has 18 attributes of pollutant concentration information and meteorological parameters with 25,627 number of records. The parameters selected for model building are carbon monoxide (CO), nitric oxide (NO), nitrogen dioxide (NO2), ozone (O3), particulate matter (PM2.5) and some metrological parameters, air pressure (AP), relative humidity (RH) and racktemp (RT). Any pollutant can be considered for concentration prediction. Here, in this study, O3 is used as forecasting object of air pollutant, as it is very important to measure this parameter at home which might lead to health issues to human being if it increases beyond the threshold value. It uses hourly data from January 1, 2016 to December 31, 2017 as training data. Year 2018 data is used as the test data. The O3 pollutant concentration spread of values over the period is as shown in Figure 5.

The data is collected at home location using the proposed IoT-based system designed for indoor air pollutant concentration measurements using low-cost sensors. The raw data measured along with measurement units are NH3 in PPM, NO2 in PPM, CO in PPM, PM2.5 in ug/m3, temperature in Celsius, pressure in hPa, altitude in ft, humidity in RH and O3 in PPB. Here, PPB is Parts per Billion and PPM is Parts per Million. The hourly air pollution data collected through IoT-based system is from November 2020 to December 2021 during COVOD-19 period. Information collected at home is at Wanowrie, Pune (Latitude 18° 28′ 54″ N, Longitude 73° 54′ 18″ E), India (Sonawani et al., 2021). The data collected has 139,448 records. It is preprocessed; all null values obtained if any are filled by replacing them with previous timestamp values. Later, these are scaled and reframed for supervised problem-solving before using them for deep learning model application. The reframed data generated is considered from left to right. It generates lagged observations timestep (t − 1) and predicting time t. The O3 pollutant concentration spread of values for home location is as shown in Figure 6.

7.2 Model building

The model used at the base system is multiheaded CNN-GRU model for training. The deep learning model used as shown in Figure 7 uses a separate convolutional layer for each attribute, and the output is merged together which is processed by GRU layers and then passed to the dense layer for single output.

The CNN layer has filters = 64, kernel size = 2, strides = 1 and activation function = relu as hyperparameters. The GRU layer uses 50 neurons and the dense layer uses 20 neurons. This architecture can capture trends and patterns from the data through every attribute and can be the best choice as a base pretrained model for training. The deep learning model implementation and experimentation is performed using Keras framework and Tensorflow in the backend.

8. Result and discussion

The base model considered is a multiheaded CNN-GRU model which is used for training on base system data, Kothrud station, Pune, India. The model is initialized with random weights. The model for O3 concentration prediction is as shown in Figure 7. The best model is saved as .h5 file. The model checkpoint is used to save the best model weights through the iterations. The RMSE value obtained after training and validation at the base station at Kothrud station is 2.04.

The data at the target system is collected (Sonawani et al., 2021), and the multiheaded CNN-GRU model is applied for experimentation on one-month data collected at home location at Wanowrie. The RMSE value obtained is 5.07 which is high. The RMSE value at the new system with less data can be further improved by the knowledge learning at Kothrud station. The larger data at the base system can be used to predict pollution concentration at new system with only one-month data available by transferring knowledge. The method called fine tuning is used. The pretrained saved model at the base system is loaded, and the model at the target system is initialized with the weights of pretrained model. The RMSE value obtained here is 2.26 which shows 55.42% improvement after TL in prediction capability at the target system with low data after transferring knowledge. The comparison of the approaches used for performance evaluation in terms of RMSE scores is as shown in Figure 8. MAE is a magnitude of prediction error. The obtained MAE is 2.08 which shows 55.36% improvement after TL. Smaller value of MSE finds data points with better fit. Here, it is as low as 8.01. The performance evaluations of the model after finetuning on one month of home monitoring system at Wanowrie along with performance evaluations at target station and base station are as shown in Table 4.

Also, Figure 9 shows the good fit at the target station after applying the TL approach, as the plot of training loss decreases to a point of stability. The training losses and testing losses are decreasing with the increase in the number of epochs. The training loss is rapidly decreasing up to first seven epochs and then becoming stable. The testing loss follows the same pattern as the training loss. In Figure 9, it is seen that the testing loss is greater than the training loss, indicating underfitting. There is insufficient data at the target station which is leading to underfitting, but the model RMSE is 2.26 which is still good improvement over the model performance without transfer learning. The model performance can be further improved by more learning with increased number of epochs. Also shown in Figure 10, the prediction ability of the model before prediction at target station with only one month of data is insufficient for model learning and prediction. Figure 11 shows the prediction ability at target station after applying the TL approach.

The results of Figures 10 and 11 show good improvement on predictions at the new air quality monitoring station in the city with insufficient data available.

9. Conclusion

This study proposes air quality measurement, prediction and warning air quality monitoring system for AAL. The proposed AAL system uses low-cost air quality, making it cost effective. The model performs calibration of low-cost sensor data using machine learning technique for performance improvement. The system proposes a novel prediction model, multiheaded CNN-GRU, which can detect next hour pollution concentration. The model uses a TL approach for prediction when the system is new and less data is available for prediction. Any neighboring site data can be used to transfer knowledge for early predictions for the new system. It can have a mobile-based application which can send warning notifications to users if the IQA parameters exceed the specified threshold values. The system has implemented the TL framework, and the results showed that the system works efficiently with performance improvement of 55.42% in RMSE scores for prediction at a new target system with less data. In future, this approach can fuel the future for pretrained models for air quality prediction. The work can be tested on huge amount of data and multiple data sets. In future, the work can be extended by performing incremental learning.

Figures

Implementation of Internet-of-Things-based air quality monitoring system

Figure 1.

Implementation of Internet-of-Things-based air quality monitoring system

Working of Internet-of-Things-based air quality monitoring system

Figure 2.

Working of Internet-of-Things-based air quality monitoring system

Transfer learning process

Figure 3.

Transfer learning process

Multiheaded 1D convolution gated recurrent unit model

Figure 4.

Multiheaded 1D convolution gated recurrent unit model

Ozone concentration spread at home

Figure 5.

Ozone concentration spread at home

Ozone concentration spread at Kothrud

Figure 6.

Ozone concentration spread at Kothrud

Multiheaded convolutional neural networks-gated recurrent unit model for ozone concentration prediction

Figure 7.

Multiheaded convolutional neural networks-gated recurrent unit model for ozone concentration prediction

Comparison of performance of approaches

Figure 8.

Comparison of performance of approaches

Model loss at target station with transfer learning approach

Figure 9.

Model loss at target station with transfer learning approach

Prediction ability of the model before transfer learning

Figure 10.

Prediction ability of the model before transfer learning

Prediction ability of the model after transfer learning

Figure 11.

Prediction ability of the model after transfer learning

Data statistics

Statistics O3 NH3 NO2 CO PM2.5 Temp Pressure Altitude Humidity
Count 139,448 139,448 139,448 139,448 139,448 139,448 139,448 139,448 139,448
Mean 17.45566 0.6592 0.1568 4.4870 0.0714 29.4590 942.4551 606.8791 42.2772
SD 110.6314 0.1444 0.0838 1.5860 0.1255 2.5575 3.767147 31.55601 13.3341
Minimum 1.340000 0.2900 0.0600 0.3200 0.0000 −140.46 932.6000 −1470.900 0.00000
25% 6.440000 0.5500 0.1100 3.7400 0.0000 28.2700 940.8700 590.4000 32.3000
50% 9.720000 0.6500 0.1400 4.2300 0.0000 29.0500 942.7300 604.4400 41.0100
75% 13.44500 0.7300 0.1600 4.9000 0.0900 30.3900 944.3200 620.8400 49.5800
Maximum 12,413.29 1.6300 1.4200 9.9200 0.4700 35.4600 1,202.8500 694.1700 100.0000

Air pollutant concentration thresholds

Pollutants Good Moderate Poor References
NO2 < 0.1 ppm 0.1–1 ppm > 1 ppm WHO (2022), EPA (2022) and Taştan et al. (2019)
PM2.5 < 30 ug/m3 30–150 > 150 WHO (2022), EPA (2022) and Taştan et al. (2019)
O3 < 25 ppb 25–102 ppb > 102 ppb WHO (2022), EPA (2022) and Taştan et al. (2019)
CO < 10 ppm 10–25 ppm > 25 ppm WHO (2022), EPA (2022) and Taştan et al. (2019)
NH3 < 0.3 ppm 0.3–1.14 ppm > 1.14 ppm EPA (2022)
Temp 18–20 Celcius < 15 and > 30 Taştan et al. (2019)
Humidity 55–65% < 30 and > 80% Taştan et al. (2019)

Performance comparison of different deep learning models

Model RMSE
CNN 20.80
Bidirectional GRU 20.46
GRU 19.61
LSTM 18.14
Multiheaded LSTM 17.64
Multiheaded GRU 17.58
Multiheaded CNN LSTM 16.93
Multiheaded CNN GRU 16.76

Performance of the best model

Error measures At target system without TL At base station At target system after TL
RMSE 5.07 2.04 2.26
MSE 25.77 4.19 8.01
MAE 4.66 1.11 2.08

References

Altamirano-Astorga, J. III, Santiago-Castillejos, I.-A., Hernandez, L. and Edgar, R.-R. (2022), “Indoor air pollution forecasting using deep neural networks”, Lecture Notes in Computer Science book Series (LNCS, volume 13264), Springer, doi: 10.1007/978-3-031-07750-0_12.

BedBreeZzz (2022), “Indoor ozone: 3 common sources explained”, available at: www.bedbreezzz.com/blogs/news/indoor-ozone-3-common-sources-explained

Bigi, A., Mueller, M., Grange, S.K., Ghermandi, G. and Hueglin, C. (2018), “Performance of NO, NO2 low cost sensors and three calibration approaches within a real-world application”, Atmospheric Measurement Techniques, Vol. 11 No. 6, pp. 3717-3735.

Britigan, N., Alshawa, A. and Nizkorodov, S.A. (2006), “Quantification of ozone levels in indoor environments generated by ionization and ozonolysis air purifiers”, Journal of the Air and Waste Management Association, Vol. 56 No. 5, pp. 601-610, doi: 10.1080/10473289.2006.10464467. PMID: 16739796.

Bun Theang, O., Sugiura, K. and Zettsu, K. (2016), “Dynamically pre-trained deep recurrent neural networks using environmental monitoring data for predicting PM 2.5”, Neural Comput, Appl, Vol. 27 No. 6, pp. 1553-1566.

Chelani, A.B., Rao, C.C., Phadke, K.M. and Hasan, M.Z. (2002), “Prediction of sulphur dioxide concentration using artificial neural networks”, Environmental Modelling and Software, Vol. 17 No. 2, pp. 159-166.

Derbez, M., Wyart, G., Le Ponner, E., Ramalho, O., Ribéron, J. and Mandin, C. (2018), “Indoor air quality in energy-efficient dwellings: Levels and sources of pollutants”, Indoor Air, Vol. 28 No. 2, pp. 318-338.

EPA (2022), “Understanding units of measurement (epa.gov)”, (last accessed 2 February 2022).

Han, P., Mei, H., Liu, D., Zeng, N., Tang, X., Wang, Y. and Pan, Y. (2021), “Calibrations of low-cost air pollution monitoring sensors for CO, NO2, O3, and SO2”, Sensors, Vol. 21 No. 1, doi: 10.3390/s21010256.

Kim, A., Wang, S., McCunn, L. and Bramono, N.T.I. (2022), “Occupant trust in indoor air quality in a large office building after an emergent wildfire”, Journal of Facilities Management, Vol. ahead-of-print No. ahead-of-print, doi: 10.1108/JFM-11-2021-0149.

Leaffer, D., Wolfe, C., Doroff, S., Gute, D., Wang, G. and Ryan, P. (2019), “Wearable ultrafine particle and noise monitoring sensors jointly measure personal co-exposures in a pediatric population”, International Journal of Environmental Research and Public Health, Vol. 16 No. 3, p. 308.

Lee, K., Parkhurst, W.J., Xue, J., Ozkaynak, A.H., Neuberg, D. and Spengler, J.D. (2004), “Outdoor/indoor/personal ozone exposures of children in Nashville, Tennessee”, Journal of the Air and Waste Management Association, Vol. 54 No. 3, pp. 352-359, doi: 10.1080/10473289.2004.10470904. PMID: 15061616.

Lu, J., et al. (2015), “Transfer learning using computational intelligence: a survey”, Knowledge-Based Systems, Vol. 80 No. 2015, pp. 14-23.

Madureira, J., Paciência, I., Pereira, C., Teixeira, J.P. and Fernandes, E. (2016), “Indoor air quality in Portuguese schools: Levels and sources of pollutants”, Indoor Air, Vol. 26 No. 4, pp. 526-537.

Mazutti, J., Brandli, L., Salvia, A., Fritzen Gomes, B., Damke, L., Rocha, V. and Rabello, R. (2020), “Smart and learning campus as living lab to foster education for sustainable development: an experience with air quality monitoring”, International Journal of Sustainability in Higher Education, Vol. 21 No. 7, doi: 10.1108/IJSHE-01-2020-0016.

Moursi, A., El-Fishawy, N., Djahel, S. and Shouman, M. (2021), “An IoT enabled system for enhanced air quality monitoring and prediction on the edge”, Complex and Intelligent Systems, Vol. 7 No. 6, doi: 10.1007/s40747-021-00476-w.

Rajasekar, D., Sekar, A. and Rajasekar, M. (2020), “Air quality monitoring and disease prediction using IoT and machine learning”, International Journal of Innovative Research in Computer Science and Technology, Vol. 8 No. 6, pp. 389-395, doi: 10.21276/ijircst.2020.8.6.4.

Rout, G., Karuturi, S. and Padmini, T.N. (2018), “Pollution monitoring system using IoT”, ARPN Journal of Engineering and Applied Sciences, Vol. 13, pp. 2116-2123.

Saini, J., Dutta, M. and Marques, G. (2020), “Indoor air quality monitoring systems based on internet of things: a systematic review, int”, International Journal of Environmental Research and Public Health, Vol. 17 No. 14, p. 4942, doi: 10.3390/ijerph17144942.

Salman, A.G., Heryadi, Y., Abdurahman, E. and Suparta, W. (2018), “Single layer and multi-layer long short-term memory (LSTM) model with intermediate variables for weather forecasting”, Procedia Computer Science, Vol. 135, pp. 89-98.

Sardar Maran, P., Reddy, B.S. and Saiharshavardhan, C. (2021), “Air quality prediction (IoT) using machine learning”, in Mallick, P.K., Bhoi, A.K., Chae, G.S. and Kalita, K. (Eds), Advances in Electronics, Communication and Computing. ETAEERE 2020. Lecture Notes in Electrical Engineering, Springer, Singapore, Vol. 709, doi: 10.1007/978-981-15-8752-8_59.

Sayeg, A.S., Munir, S. and Habeebullah, T. (2014), “Comparing the performance of statistical models for predicting PM10 concentrations”, Aerosol and Air Quality Research, Vol. 14 No. 3, pp. 653-665, doi: 10.4209/aaqr.2013.07.0259.

Seguel, J.M., Merrill, R., Seguel, D. and Campagna, A.C. (2017), “Indoor air quality”, American Journal of Lifestyle Medicine, Vol. 11 No. 4, pp. 284-295.

Slezakova, K., Pereira, M.C. and Morais, S. (2019), “Ultrafine particles: levels in ambient air during outdoor sport activities”, Environmental Pollution, Vol. 258, doi: 10.1016/j.envpol.2019.113648.

Sonawani, S., Chumchu, P. and Patil, K. (2022), “Multi_headed CNN_GRU model for particulate matter (PM2.5) prediction in smart cities”, International Journal of Environment and Waste Management, Inderscience, doi: 10.1504/IJEWM.2023.10039181.

Sousa, S.I.V., Martins, F.G., Alvim-Ferraz, M.C. and Pereira, M.C. (2007), “Multiple linear regression and artificial neural networks based on principal components to predict ozone concentrations”, Environmental Modelling and Software, Vol. 22 No. 1, pp. 97-103.

Subhalakshmi, R.T., Balamurugan, S.A.A. and Sasikala, S. (2021), “Deep learning based fusion model for covid-19 diagnosis and classification using computed tomography images”, Concurrent Engineering, Vol. 30 No. 1, pp. 1-12, doi: 10.1177/1063293x211021435.

Taştan, M. (2019), “An IoT based air quality measurement and warning system for ambient assisted living”, Avrupa Bilim ve Teknoloji Dergisi, No. 16, pp. 960-968.

Tsai, Y.-T., Zeng, Y.-R. and Chang, Y.-S. (2018), “Air pollution forecasting using RNN with LSTM”, In: 2018 IEEE 16th Intl Conf on Dependable, Autonomic and Secure Computing, 16th Intl Conf on Pervasive Intelligence and Computing, 4th Intl Conf on Big Data Intelligence and Computing and Cyber Science and Technology Congress (DASC/PiCom/DataCom/CyberSciTech), IEEE, pp. 1074-1079.

WHO (2019), “Air pollution levels rising in many of the world’s poorest”, available at: www.who.int/mediacentre/news/releases/2016/air-pollution-rising/en/#.WhOPG9ANlBk.mendeley (accessed 22 February 2022).

WHO (2022), “WHO global air quality guidelines: particulate matter (PM2.5 and PM10), ozone, nitrogen dioxide, sulfur dioxide and carbon monoxide”, (accessed 2 February 2022).

World Health Organization (2018), Air Pollution and Child Health-Prescribing Clean Air, WHO, Geneva, Switzerland, available at: www.who.int/ceh/publications/Advancecopy-ct24_18150_Air-Pollution-and-Child-Health-mergedcompressed.pdf (accessed 25 February 2022) (accessed September 2018).

Zhang, X., Lin, W., Ma, Z. and Xu, X. (2021), “Indoor NH3 variation and its relationship with outdoor NH3 in urban Beijing”, Indoor Air, Vol. 31 No. 6, doi: 10.1111/ina.12907.

Zheng, Y., Liu, F. and Hsieh, H.-P. (2013), “U-air: when urban air quality inference meets big data”, Proceedings of the 19th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining.

Zhu, X., Dang, Y. and Ding, S. (2021), “Forecasting air quality in China using novel self-adaptive seasonal grey forecasting models”, Grey Systems: Theory and Application, Vol. 11 No. 4, doi: 10.1108/GS-06-2020-0081.

Zimmerman, N., Presto, A., Kumar, S.P.N., Gu, J., Hauryliuk, A., Robinson, E.S., Robinson, A.L. and Subramanian, R. (2018), “A machine learning calibration model using random forests to improve sensor performance for lower-cost air quality monitoring”, Atmospheric Measurement Techniques, Vol. 11 No. 1, pp. 291-313.

Further reading

Cai, M., Yin, Y. and Xie, M. (2009), “Prediction of hourly air pollutant concentrations near urban arterials using artificial neural network approach”, Transp. Res. D, Vol. 14 No. 1, pp. 32-41.

Cho, H. (2017), “An air quality and event detection system with life logging for monitoring household environments”, Smart Sensors at the IoT Frontier, Springer, Cham, pp. 251-270, doi: 10.1007/978-3-319-55345-0_10.

Chuentawat, R. and Kan-Ngan, Y. (2018), “The comparison of pm2.5 forecasting methods in the form of multivariate and univariate time series based on support vector machine and genetic algorithm”, 15th International Conference on Electrical Engineering/Electronics, Computer, Telecommunications and Information Technology (ECTI-CON), pp. 572-575, doi: 10.1109/ECTICon.2018.8619867.

Hu, Y. and Zhao, B. (2020), “Relationship between indoor and outdoor NO2: a review”, Building and Environment, Vol. 180, doi: 10.1016/j.buildenv.2020.106909.

Sánchez-DelaCruz, E., Salazar Lopez, J.P., Lara Alabazares, D., Tello Leal, E. and Fuentes-Ramos, M. (2021), “Deep learning framework for leaf damage identification”, Concurrent Engineering: Research and Applications, Vol. 29 No. 1, pp. 25-34, doi: 10.1177/1063293X21994953.

Sonawani, S. and Pati, K. (2021), “Air pollutants dataset of Pune City, India”, Mendeley Data, Vol. 1, doi: 10.17632/9rzgv6xd57.1.

Sonawani, S. and Patil, K. (2021), “Dataset of indoor air pollutant concentration using low cost IOT based system”, Mendeley Data v1, doi: 10.17632/7bsc526pzn.1.

Zhang, J. and Ding, W. (2017), “Prediction of air pollutants concentration based on an extreme learning machine: the case of Hong Kong”, International Journal of Environmental Research and Public Health, Vol. 14 No. 2, p. 114, doi: 10.3390/ijerph14020114.

Corresponding author

Kailas Patil can be contacted at: kailas.patil@vupune.ac.in

About the authors

Shilpa Sonawani a PhD student of Vishwakarma University and is currently working as an Assistant Professor in the School of Computer Engineering and Technology, MITWPU, Pune, India. Her research interests include Machine Learning and Data Analysis.

Kailas Patil is an Alumnus of National University of Singapore and is currently working at Vishwakarma University, Pune, India. His research interests include Cyber Security, Ubiquitous Computing, Internet of Things and Embedded Systems. He has been a reviewer of many international journals.

Related articles