# IoT Implementation of Kalman Filter to Improve Accuracy of Air Quality Monitoring and Prediction
## 1 Introduction  
The IoT (Internet of Things) is an important part of the new generation of information technology. It refers to a huge network formed by combining various information sensing devices with the Internet [1]. In recent years, the widespread use of IoT terminal equipment has led to a spurt of terminal data and connections, requiring a more computationally efficient IoT network architecture to enable timely data analysis and processing. At the same time, IoT business is continuously derived and widely used in smart agriculture, smart home, intelligent transportation and other fields. Many special application scenarios, such as security monitoring, real-time road condition information collection, automatic driving, etc., require the network to further reduce the data transmission delay [2]. The processing and computing power of the traditional wireless network architecture is insufficient to support the deep coverage and massive connection of the intelligent IoT. Moreover, the cloud computing platform is far from the IoT terminal, which is difficult to meet the real-time data requirements of low-latency services [3]. The proposed edge computing [4] provides a new way to solve the development bottleneck of IoT and is considered to be the key enabler of IoT. Edge computing refers to an open platform that integrates network, computing, storage and application core capabilities on the edge of the network, which nears the things or data source. It provides edge intelligence services, to meet the key needsof industry digitalization in agile connectivity, real-time business, data optimization, application intelligence, security and privacy protection, etc. Edge computing features are like human nerve endings, which can self-process simple stimuli and feedback the processed features to the cloud brain. Smart agriculture makes the application of IoT technology in traditional agricultural production more \"intelligent\" by using sensors and software to control agricultural production through mobile platforms or computer platforms. In smart agriculture, establishing a real-time monitoring and prediction system for air quality (AQ) is the most basic and most important solution [5]. The prediction for AQ is based on the analysis of the monitoring data. In other words, the accuracy of the monitoring data affects the accuracy of the prediction to a certain extent [6]. At the same time, the Environment Agency also has specified specific values for AQ [7]. Once current AQ exceeds the threshold, people should take appropriate countermeasures. However, when the prediction is inaccurate, it will lead to decision errors. In order to obtain high-precision monitoring data, many AQ monitoring schemes currently existing use high-precision sensors. However, high-precision sensors are often accompanied by higher costs. A complete system consists of multiple sets of sensors [8], so there is a trade-off between cost and accuracy. In addition, in a traditional IoT-based AQ monitoring system, the data collected by the sensing layer needs to be uploaded, analyzed and processed in the cloud computing platform at the network layer [9]. However, in China, most agricultural areas are in remote locations and harsh environments limited by bandwidth and network connectivity [10]. The timely uploading of monitoring data and the analysis of prediction results cannot be guaranteed, which affects the timeliness of decision-making. Therefore, edge computing with real-time computing power should be considered to solve the bottleneck of traditional cloud computing solutions in agricultural application scenarios. In order to improve the real-time performance and reduce the cost of the traditional monitoring system, this paper combines edge computing and IoT application in smart agriculture. Under a relatively low hardware cost, the air quality monitoring and prediction system based on the Kalman Filter (KF) algorithm can greatly improve the accuracy, both in monitoring and predicting values.