# IoT Implementation of Kalman Filter to Improve Accuracy of Air Quality Monitoring and Prediction
## 6 Conclusions  
Based on the application of edge computing and IoT in smart agriculture, this paper establishes a low-cost air quality monitoring and prediction system via Raspberry Pi, which is an edge device to run the Kalman Filter algorithm. Compared to the traditional air quality monitoring and prediction system that processes in the cloud, this paper puts the machine learning algorithm on the edge, which can avoid the problem of data transmission delay due to bandwidth and network connection limitations in the agricultural environment, and improves the real-time decision-making. By running the KF algorithm on the RPi, which has strong computing power and is used as the edge device, the immediate predictions of six type of air pollutants such as SO\({}_{2}\), NO\({}_{2}\), CO, O\({}_{3}\), PM2.5 and PM10 are realized. Compared with the other three algorithms SMA, EWMA and ARIMA, it can be seen that even with low-accuracy sensors, the error of the prediction results based on the KF is the smallest. RMSE is also reduced by an average of 68.3%. In addition, compared with the observation data of sensors, the accuracy of the predicted value by the KF algorithm is improved by 27%, which improves the accuracy of sensors from the aspect of the algorithm. Compared to other air quality monitoring equipment, the cost of our proposed solution is reduced by at least 10% with the same observation accuracy. In other words, our proposal avoids the trade-off between cost and accuracy in traditional solutions.  
In the process of applying the Kalman Filter algorithm to predict the concentration of various air pollutants, this paper ignores the influence of the external environment on concentration of pollutants. Such factors as factory emissions, wind speed, and other factors will have a direct impact on the current concentration of pollutants. In future work, if we can get this data, we can further improve the accuracy of the model. For the proposed system, the edge computing layer based on the sensor network and the Raspberry Pi was designed to be too centralized [55]. When the RPi that is in the center breaks down, the problem of disaster recovery backup will emerge, resulting in long-term paralysis of regional functions (requiring human intervention to troubleshoot) and data loss. At the same time, the monitoring and early warning mechanism of the edge computing layer itself is not perfect. In summary, it is necessary to consider the above two problems on the algorithm and the system when applying the system to the actual production environment in the future.  
Conceptualization--X.L. Writing--original draft--T.Y. Formal Analysis --Z.W. and T.Y. Writing--review & editing--P.C. All authors contributed to the idea and presentation of the paper. This research was funded by Guangdong Natural Science Foundation, grant number 2018A030313340, Foundation for Distinguished Young Talents in Higher Education of Guangdong, China, grant number 2014 KQNCX154, Technology Development Project of Guangdong Province, grant number 2017A0101034, Innovation Projects for Science supported by Department of Education of Guangdong Province, grant number 2016 KTSCX141. This paper is supported by High Performance Computing and Massive Information Processing Research Lab, South China University of Technology. The authors declare no conflict of interest.