Full text
Data Reconstruction Applications for IoT Air Pollution Sensor Networks Using Graph Signal Processing Pau Ferrer-Cida,1,∗, Jose M. Barcelo-Ordinasa,1, Jorge Garcia-Vidala,1 aUniversitat Politecnica de Catalunya, 08034, Barcelona, Spain Abstract The analysis of sensor networks for air pollution monitoring is challenging. Recent studies have demonstrated the ability to reconstruct the network measurements with graphs derived from the acquired data, thus describing the complex relationships between the sensors that compose the network. In this work, we propose a graph-based data reconstruction framework that can be used to carry out different post-processing applications that arise in real-world low-cost sensor deployments for air pollution monitoring. This data reconstruction framework first describes the relationships between the different network sensors by means of a graph learned from the measured data, and then a signal reconstruction model is superimposed to reconstruct sensor data. This methodology allows reconstructing sensor data to carry out missing value imputation, signal reconstruction at points where there are no physical sensors (virtual sensing), or data fusion. The results, using real data taken with an air pollution monitoring network including reference stations and low-cost sensors, show how this framework performs well for these applications compared to estimates obtained from individual sensors and task-specific state-of-the-art methods that are not able to deal with this necessary range of applications. In short, the results show the potential of using graphs, whose topology is based on the measurements taken, to calibrate and reconstruct signals in heterogeneous networks of low-cost air pollution sensors for a wide variety of applications. Keywords: IoT network, Low-cost sensors, Graph signal processing, Missing value imputation, Virtual sensing, Data fusion. 1. Introduction Nowadays, we live in a world affected by air pollution. The consequences of pollution on both health and nature are undeniable. According to the World Health Organization (WHO), pollution causes 4.2 million deaths a year and causes health problems to the population on a daily basis. Governments are thus determined to carry out air pollution monitoring campaigns, as well as to implement measures to mitigate the effects of high levels of pollution. The reference stations established by the government agencies to measure air pollution are very precise but have a very high economic cost, in the order of several tens of thousands of Euros, which is why the number of stations distributed in an area is small. Thus, these reference station networks have a low spatial resolution given that the number of reference stations over an area of interest is usually small, and consequently, air pollution cannot be measured at all desired locations. In addition, these reference stations publish pollution data such as NO2, NO, O3, PM2.5, PM10, on an hourly basis, although for scientific purposes the management agencies can provide the data in smaller resolutions, e.g. 15 minutes. There are several ways to increase the spatial resolution of the data at a lower economic cost, but at a cost in the accuracy of the data taken [1]. The first way is to add nodes that ∗Corresponding author Email addresses: [email protected] (Pau Ferrer-Cid), [email protected] (Jose M. Barcelo-Ordinas), [email protected] (Jorge Garcia-Vidal) incorporate low-cost sensors and communicate their data to an open cloud platform that allows, together with the reference stations, to form a denser network [2]. Low-cost sensors offer an inexpensive alternative, costing hundreds of euros, allowing more data collection nodes to be added over an area of interest, increasing the spatial resolution at which measurements are obtained. The main challenge in a deployment with low-cost air pollution sensors is that they have to be calibrated at the deployment site as they are highly dependent on the environmental conditions, mainly the ambient temperature and relative humidity [3, 4, 5, 6, 7]. A second way to increase data resolution is to include virtual sensors [8]. A virtual sensor can be defined as a mathematical model that estimates air pollution concentrations at a specific location where no physical sensor is available [3]. These virtual estimation techniques can be based on the use of physical or statistical models. Some examples would be the use of machine learning techniques, graph-based models, consensus algorithms, physical models, etc. The use of virtual sensors is not limited to increasing spatial resolution, but has applications ranging from sensor recalibration, drift or aging correction, to the construction of monitoring maps or as boundary data for numerical simulation models; e.g. computational fluid dynamic models. The advent of the graph signal processing (GSP) field has allowed the description of air pollution sensor networks using graphs for different applications [9, 10, 11]. Therefore, an approach to the applications outlined above is to use the measure- 1 © 2022 Elsevier. This manuscript version is made available under the CC-BY-NC-ND 4.0 license http://creativecommons.org/licenses/by-nc-nd/4.0/
ments from the other sensors in the network, potentially correlated, rather than using the sensors individually. The approach we explore in this paper is to build a network of physical nodes consisting of reference stations and low-cost sensor nodes, and create a graph whose edges are assigned a weight that relates the different nodes according to some criteria, e.g. the distance between nodes or the correlation between nodes [12, 13]. We explore several applications that can be carried out on the graph by reconstructing the sensors’ signals. For example, it is possible to reconstruct the signal over the graph, even if there are nodes that do not report data during a period of time, it is possible to fuse data from different nodes, or you can add a virtual sensor by adding a new vertex and correlating it to the rest. The challenge of the graph-based data reconstruction technique is to i) find a way to relate the nodes of the graph (i.e., find the appropriate weights to be assigned to the edges), both when creating the original network and when adding virtual sensors, and ii) reconstruct the signal at the points of the graph, again, both at the original nodes (i.e., to recalibrate and detect drifts or aging or to fuse data) and at the virtual nodes (i.e. to increase the spatial density or to calibrate in-situ a low-cost sensor to be deployed at that point). To reconstruct the signal at a graph vertex, we can use different techniques, ranging from using a linear combination whose coefficients are the Laplacian weights of the edges of the neighbors of the target vertex, to using a combination of the neighbors whose coefficients are calculated using a supervised or semi-supervised machine learning model [12, 14, 10]. Each of these techniques has its advantages and disadvantages, and their field of use depends on the application, e.g. calibration or recalibration of sensors, creation of a new virtual sensor, prediction of concentrations at nodes that have a high percentage of missing data, etc. The objective of this work is to study a graph-based data reconstruction framework for low-cost sensor networks applied to a real IoT platform of tropospheric ozone (O3) sensors, studying the possible applications that arise when reconstructing the signal in the network nodes depending on the network configuration, and analyzing its advantages and disadvantages. Specifically, in this work, we: • identify different graph configurations to suit possible applications that arise in heterogeneous low-cost air pollution sensor networks, such as missing value imputation in a node, creation of virtual sensors, and the fusion of data, • propose a graph-based data reconstruction framework, composed by graph inference and signal reconstruction, for the realization of the three applications mentioned above, • compare the performance of each application on a data set obtained from the actual deployment of a low-cost air pollution sensor network. The outline of this paper is as follows: section 2 shows the related work. Section 3 describes different possible signal reconstruction applications for a sensor network. Sections 4 and 5 explain the graph-based data reconstruction framework to learn a graph topology and apply signal reconstruction, and the data set used in the study. Section 6 shows the results obtained in a real IoT low-cost sensor network. Finally, section 7 presents the conclusions of the paper. 2. Related work In-situ low-cost sensor calibration: low-cost air pollution sensors come uncalibrated or calibrated in a chamber by the manufacturer. Thus, when they are deployed in a different environment than the manufacturing environment, a new calibration process is required in the deployment location due to dependencies on environmental parameters such as temperature or relative humidity [3, 4]. So far, the calibration of low-cost air pollution sensors is performed by placing a node with the sensors to be calibrated close to a reference station for a period of time, in the order of several weeks. The data collected by the lowcost sensor and the reference station are compared with a model that can be linear; e.g., multiple linear regression [15, 16, 17], or non-linear; e.g., support vector regression [18, 19, 20], knearest neighbor [17, 18], random forest [18, 19], and artificial neural networks [15] including deep architectures [21]. All these methods calibrate the sensor individually. The sensor is then deployed at a location close to the calibration site, and as time passes, it drifts, mainly due to changes in the environmental conditions in which the calibration was performed, and it ages [4, 3, 18, 22]. In addition, these sensors often do not report all the data, resulting in data gaps that cannot be observed by applications [10, 23]. However, none of these works take advantage of the fact that the nodes form a monitoring network with highly correlated measured values and thus can collaborate in a distributed manner to recalibrate or predict concentration values, and to predict missing data when a sensor temporarily fails to report data due to a malfunction. Sensor missing data imputation, creation of virtual sensors and limitations: data imputation is the process of filling missing values with estimated values. Quinteros et al. [24] compare approaches such as mean imputation, conditional mean imputation, K-nearest neighbor imputation, multiple imputation, and Bayesian principal component analysis imputation for detecting missing data in air quality data sets. The aim is to use data from the same data set to reconstruct the missing data. Zhang et al. [25] use k-means to cluster nodes that are highly correlated with the target node to construct a virtual sensor. Liu et al. [26] propose the use of low-rank matrix completion methods for missing imputation of air pollutants given their strong spatial correlation. Okafor et al. [27] compare different machine learningbased imputation methods using the sensors’ time series, as well as their impact on the posterior sensor calibration, showing the superiority of Variational Autoencoders (VAE). Mondal et al. [28] develop a missing value imputation method for sensor networks based on spatio-temporal graph signal reconstruction via Sobolev smoothness. Matrix factorization techniques have also been used for data reconstruction for missing value imputation [29]. Matusowsky et al. [30] create a virtual sensor using machine learning to impute data or to use it as substitute for 2
a faulty sensor. Thus, this virtual sensor created from the other nodes using a multi-layer perceptron (MLP) algorithm serves as a substitute for a sensor, proving high accuracy results. Aiello et al., [31] show a machine learning-based algorithm for creating virtual sensors where a physical air pollution sensor cannot be placed. They train a land use (LU) regression-based framework to increase the number of sensors in a network so that the spatial resolution is increased. A limitation of machine learning algorithms in in-situ calibration of air pollution sensors is that to estimate missing data, or to add virtual sensors, the sensors must be placed in the same location, or the machine learning method has to be fed with many features and node data, which increases the possibility of overfitting and its difficulty of application in a setting where more than one sensor can have data gaps. Fung et al. [32] attack this problem by defining a proxy for black carbon as a virtual sensor, and making a selection of the three best variables in a multiple regression problem to estimate black carbon. If one of the three inputs is missing, they regress the other two variables. The model shows good results in terms of R2and adjusted R2. Zaidan et al. [23] employ a Bayesian neural network to overcome overfitting when a proxy is used to calculate missing data. The authors use mutual information to perform variable selection and thus select the most correlated inputs. Zaidan et al. [33] show the generalization of low-cost sensor calibration using two reference stations, as well as the ability to create virtual sensors for black carbon and carbon dioxide. Finally, the use of virtual sensors reaches computational fluid dynamic models [34], where virtual sensors are obtained from the values simulated by computer models. Overall, virtual sensors can be used in several applications, and the creation of these is usually based on machine learning techniques. Therefore, the main limitation of machine learning-based models for data imputation or virtual sensor creation is their lack of flexibility, given the need to create a model for each sensor or set of sensors to impute values or reconstruct their signals and the possibility of dealing with situations where different sensors may have gaps. In addition, these models may not use information from other nodes that have correlated data or that have more accurate data such as reference stations. In this paper, we propose the use of graphbased data reconstruction framework to fill in the missing data or create virtual sensors, where several network nodes may participate in the data reconstruction and may have missing data. Graph-based alternative to heterogeneous air pollution sensor monitoring networks: the use of graphs in conjunction with graph signal reconstruction techniques provides the necessary flexibility, where given the graph, semi-supervised techniques can be applied to compute the signal from one node or set of nodes at a given time. Ferrer-Cid et al. [10] propose a different way of approaching the sensor network modeling problem that consists of first finding the relationships between the nodes via a graph, and then reconstructing a node signal using its neighboring nodes’ signals. This decouples the variable selection from the signal reconstruction as opposed to previous work, and allows flexibility in the modeling of the network and the reconstruction of any network node to fit possible scenarios. This study focuses on the best way of inferring the graph by comparing three approaches based on graph signal processing (GSP) techniques [12]: distance-based methods, statistical methods based on graphical lasso, and methods based on graph signal smoothness. Our work: in this paper, we propose a graph-based data reconstruction framework for different application scenarios such as predicting missing data at a node, creating virtual sensors, and data fusion. Thus, our approach uses the full potential of the network to improve the results by only using individual sensors. This vision is in line with Motlagh et al. [35], who consider that future air pollution monitoring networks will be composed of heterogeneous nodes including high-cost reference nodes and low-cost sensor nodes. More specifically, we can define the contribution of this work as the definition of a framework based on graphs that are built using the data acquired by the network nodes, and that by reconstructing the signal from the network nodes is able to address applications such as missing data imputation, virtual sensing, and data fusion. Thus, advancing the state of the art by providing a framework capable of dealing with various post-processing applications needed in heterogeneous low-cost air pollution sensor networks. 3. Sensor network applications in heterogeneous air pollution monitoring networks In general, in an air pollution deployment, low-cost sensor nodes are collocated at a reference station or reference instrument near the location of the node deployment, Figure 1.a). This process is called in-situ calibration in uncontrolled environments, and has to be performed in the deployment area because the calibration needs to be done in the same environmental conditions in which the node will monitor the pollutant due to the dependence on temperature and relative humidity of the air pollution sensors [15, 16, 17, 18, 4, 3]. After this calibration process, the node is deployed in an area participating in the monitoring network. The calibration process is carried out using machine learning algorithms and involves a training phase where the model is trained, and a validation or test phase of the model where the sensor signal is predicted or reconstructed. Thus, we now assume a monitoring network in which reference stations that give accurate values of the pollutants coexist with nodes mounting low-cost sensors that give less accurate values, and the low-cost sensors have been pre-calibrated using in-situ calibration [35]. In this sensor network scenario, we are interested in performing a signal reconstruction at a given node or location for several reasons: i) there is a low-cost sensor or reference station that has not captured all the values of a time series, and we want to estimate the missing values, ii) there is a low-cost sensor node that needs to be recalibrated due to drifts or changes in atmospheric conditions from when it was calibrated, iii) because the in-situ estimation of a low-cost sensor is not very accurate, the values of the neighboring nodes can improve the overall estimate given by that sensor, iv) to provide robustness when the physical sensor fails or is under maintenance, or v) because we need values at points where we do not have a low-cost sensor, for example, to feed a computational 3
(a) In-situ calibration and missing value imputation cases. (b) Virtual sensors and data fusion cases. Figure 1: Description of different sensor applications, and its corresponding graph-based data reconstruction setting, that arise in low-cost sensor networks; in-situ calibration, missing value imputation, virtual sensing, and data fusion. fluid dynamics (CFD) model that builds a simulated air pollution transport model at small or large scale. The monitoring network is described by the relationships between the Nnodes (reference stations and low-cost sensors) in the network by means of a graph, defined by a triplet G={V,E,W}. Where V={1, ..., N}is the set of vertices forming the graph, E={ei j:vi,vj∈V}contains the set of edges and matrix W={Wi j:ei j∈E}represents the weights of the corresponding edges. A weight of zero represents that there is no edge between the vertices. The Laplacian matrix Lis the object of study of the graph signal processing framework, the combinatorial Laplacian is symmetric, has non-positive off-diagonal elements, and can be computed as L=D-Wwhere Dis the degree matrix defined as Dii=PjWi j. The Laplacian also describes the relationships between the nodes and its eigendecomposition provides the graph Fourier basis. The first step is to form the graph and therefore obtain a matrix that defines the relationships between the nodes that participate in the monitoring network. There are several techniques to create the graph, such as distance-based methods [36], statistical methods [37] and smoothness signal-based methods [38]. The subsection 4.1 explains in more detail the method used in this study. Once the graph has been formed, the signal can also be reconstructed for each network node using different techniques, subsection 4.2. To infer the graph, we have to define which nodes participate in the network, and this aspect depends on the scenarios we want to implement. Therefore, we will first give three examples of applications, figure 1, illustrating the challenges in such a monitoring network, and in section 4, we will describe how the graph is inferred and how the signal is reconstructed. i) Missing value imputation: In a monitoring network, both reference stations and low-cost sensors usually do not report all data [10, 24, 23], resulting in gaps in the time sequence of data they report. For example, Ferrer-Cid et al. [10] mentions missing data of the order of 1.5-3% in reference stations in Barcelona, Spain. Figure 1.a), case A, shows the architecture for completing the missing xidata in the i-th node from its neighboring N(xi) values. To do this, we define a graph in which the target vertex xican be a reference station or a low-cost sensor, depending on which node loses data. To estimate the missing data, we need to apply a semi-supervised learning method to perform signal reconstruction, which allows nodes with all data and is also able to allow more than one node having missing data in the monitoring network. ii) Virtual sensing: A virtual sensor is a vertex of the graph in which we want to estimate the concentration of a contaminant without having a physical sensor. Figure 1.b), Case B, shows the architecture for estimating the concentration of the contaminant in the target sensor. To do this we have to add a vertex xiin the graph in the place where we would place the target sensor. To train the graph we need to place a low-cost sensor or mobile reference station to train the graph and calculate the weights that will relate the vertex representing the virtual sensor to its neighbors. In case you do not have a sensor to train the network, you can use a function that depends on the distance to the other nodes and that allows to calculate if there is a link and its weight with those nodes [10, 36]. Once the network is trained and the weights of the graph are obtained, we can remove the sensor or the mobile reference station to estimate the values of the virtual sensor. A supervised or semi-supervised method can now be used to reconstruct the signal xion the virtual sensor xifrom its neighboring N(xi) values. A special case is a proxy in which we consider that the estimation of the target node is made from the measurements of other pollutants. A key difference with case A is that in case B there is no data at the target node in the estimation test phase (there may not even be a physical sensor at the node where the signal is reconstructed), whereas in case A, there is sensor data, with gaps, in the estimation test phase. iii) Data fusion: In data fusion, the value of the concentration at one point is estimated from several sensors, including a sensor that may be located at the target location. An exam- 4
Figure 2: Data reconstruction framework, from the graph learning stage to the data reconstruction to carry out several applications. ple is a low-cost sensor that gives inaccurate data or drift and improves its estimates with sensors in its neighborhood. Figure 1.b), Case C, shows the architecture in which one vertex is added at the target point xito merge the data from the target sensor with adjacent estimates N(xi). Note that at the target location there are two vertices, one with the sensor giving inaccurate measurements and one with a virtual sensor on which we want to estimate the value using the inaccurate neighboring node and the neighboring nodes to both. To do this, we have to operate as in case B, and add a low-cost sensor or mobile reference station at the point where we will estimate the value, keeping the original sensor with drift. Finally, in this case, both supervised and semi-supervised methods can be used to estimate the fusion of sensors that give the final concentration value. The main difference between this case and case A, is that in this case there can be two nodes at the same geographical location (e.g., case of a mobile reference station and a low-cost sensor, or several low-cost sensors [39]) and the target sensor can have data gaps or no data at all (i.e., as a virtual sensor). We observe that the node to be reconstructed can be a reference station or a low-cost sensor in any of the three cases. The methodology for constructing the graph and reconstructing the signal is the same for all three cases, but the role and participation of the nodes in each phase are different. In the graph inference phase, a node is needed to train the graph, which can be a reference station or a low-cost sensor. However, for the reconstruction phase, the nodes participate with different roles; in case A the target node has missing data, in case B, the target node has no data participating, and in case C, there are two nodes in the same location with the data of one of them participating in the reconstruction. 4. Graph-based data reconstruction framework This section provides an introduction to the methodology used to learn the graph topology Gand apply signal reconstruction at the network nodes. Learning or inferring the topology of the graph means obtaining the weighting matrix. However, depending on the signal reconstruction method, sometimes the weighting matrix W, the adjacency matrix A, or the Laplacian matrix Lis used. The three matrices are related, and when we know the weighting matrix it is immediate to build the adjacency matrix or the Laplacian matrix and vice versa. Figure 2 shows the different steps needed to obtain the network topology Gto use in some of the signal reconstruction applications described in section 3. First, the training data X∈RN×P, where Pis the number of observations per node and Nis the number of nodes, is used for graph learning, but first its variables are standardized. Then, a graph learning model is chosen along with its corresponding hyperparameters. In order to obtain the Laplacian L, a 5-fold cross-validation is performed on the training data to find the best graph to reconstruct each one of the nodes with its neighbors. The hyperparameters to build the Laplacian and train the signal reconstruction method (if necessary) are those that minimize the average cross-validation root-mean-square error. The train set can be used to infer the structure of the graph and train the signal reconstruction model. For example, there are methods based on prior information, such as the distance between nodes, where no training data is required to infer the graph, but a function that gives weights according to the distance between nodes. However, the data does participate in graph inference when we use other methods such as the graphical lasso or the smoothness signal-based method. To reconstruct a graph signal xwe need the inferred graph to perform the data reconstruction of any signal during the estimation phase. We will use the root mean square error (RMSE), the mean absolute error (MAE), and the coefficient of determination R2as metrics to evaluate the models. The graph Gis used to describe the relationships between the air pollution measurements provided by each network node. In the case of low-cost sensors, these concentrations are predicted from the raw values measured by the sensors using supervised machine learning models that have been trained in-situ before the network deployment [15, 2, 4, 3]. 4.1. Graph learning models There are several ways to infer the graph. Using the GSP framework, a signal over a graph can be defined as x:V→R. The topology of the corresponding graph Gcan then be found by using the available prior information, e.g. the physical distance between nodes to obtain the weights of the graph, or by using a smoothness criterion to obtain the Laplacian [36, 38]. The distance-based method does not use the data to infer the weights relating the nodes, and therefore can add edges between nodes 5
whose data are not correlated [10]. An example is the creation of a virtual sensor in a high pollution zone using nodes located in a green zone close to the virtual sensor. In the context of air pollution sensor networks, the common type of graph used is an undirected graph since the relationships between the pollution measured by any pair of nodes are reciprocal. Therefore, we focus on learning an undirected graph G, which implies a symmetric Laplacian matrix L=LT. The use of graph inference techniques based on structured data allows the selection of edges in the training phase among those nodes that have similar conditions to the target detection point. Methods such as the graphical lasso or smoothness signal-based methods have been proposed to infer the graph using the measured network data [12]. In a previous work, we analyzed the best method to create a graph in an air pollution monitoring network, showing that smoothness signal-based methods perform better than the graphical lasso in air pollution monitoring networks using supervised and semi-supervised signal reconstruction methods [10]. Therefore, this will be the graph inference method used in this work. A signal over a graph G is said to be smooth if neighboring nodes with large weights tend to have similar values. Dong et al., [38] use the smoothness criteria and define the following non-convex optimization problem to learn the Laplacian matrix: min L,Y∥X−Y∥2 F | {z } data f idelity +αtr(YTLY) | {z } smoothness +β∥L∥2 F | {z } sparsity s.t. tr(L)=n, Li j =Lji ≤0,i=j, L·1=0. (1) Where ||·||Fdenotes the Frobenius norm and tr(·)denotes the trace of a matrix. In addition, [38, 40] show how these methods scale well in sparse matrix applications, which are the cases considered in this paper. Indeed, Dong et al. [38] mention the use of alternating direction method of multipliers (ADMM) optimization methods to overcome possible scalability issues and learning larger graphs. 4.2. Signal reconstruction The signal reconstruction of a node xican be tackled from different perspectives, but here a supervised learning and semisupervised learning are described. As supervised learning method, a multiple linear regression (MLR) can be applied to predict the values at node xiusing its neighboring N(xi)values. The estimated signal at target node xiis the linear combination of 1-hop neighboring signals, ˆ xi=Pj∈N(xi)ajxj, where the optimal coefficients ajcan be obtained training a MLR model per sensor during the training phase using the same data used to learn the graph. Although this method is the linear minimum mean squared error (LMMSE) estimator, it may have problems when neighboring data may be incomplete or when estimating simultaneously the values at several network nodes. The alternative that naturally fits this setting is the semi-supervised learning or the graph signal reconstruction approach, where with the use of the Laplacian matrix Lthe values at different nodes can be simultaneously estimated. For example, the Laplacian interpolation (the graph interpolated regularization shown by Belkin et al., [41]) finds the values at the unobserved nodes by maximizing the smoothness (minimization of the Laplacian quadratic form yTLy) of the signal with respect to the Laplacian without altering the observed measures: min yyTLy s.t. yi=xi,∀i∈S, (2) Where Sdenotes the subset of vertices where measures are available and Lis the corresponding Laplacian matrix. This transductive semi-supervised learning method is used as signal reconstruction method due to its simplicity and fit to the cases explained in section 3, as data may be missing or simultaneous values may need to be estimated. Indeed, the solution of (2) to reconstruct a node’s signal xiresults in a linear combination of its neighboring nodes weighted by the Laplacian entries: ˆ xi=−L−1 ii X j∈N(xi) Lijxj(3) 4.3. Application and deployment This section covers the technical details of the deployment of the data reconstruction framework. We can divide the different tasks into three stages. First, the low-cost sensors are calibrated in-situ at a reference station located near its deployment site. Thus, before the sensor network deployment, the machine learning models are trained to predict air pollution concentrations from low-cost sensors’ raw measurements in a centralized server [3, 4, 15, 17, 18, 19, 20]. The trained calibration models to estimate new values can be stored in the central server or in the nodes [3]. Secondly, since the data collection nodes send the samples to a central server, the graph can be computed during the first weeks of deployment, where it is assumed that the deployed sensors work correctly. The graph is learned by solving the optimization problem of Eq. (1) using a cross-validation procedure. Finally, during the lifetime of the sensor network different applications (e.g., missing value imputation or virtual sensor creation for sensor maintenance) can be carried out in real-time using the data reconstruction framework. The graph construction and signal reconstruction can be performed in a centralized or distributed manner. The nodes report hourly air pollution concentrations, so to build the graph in a distributed manner, each node needs to do hourly flooding of the measured air pollutant concentrations (e.g., using a lowduty cycle flooding protocol [42]) during the training period of the graph, which is about three weeks. After the network training, flooding is no longer necessary, and the nodes in the distributed solution only report their hourly air pollutant concentration to the neighbors defined by the graph. The typical and most efficient solution in this type of sensor network is for the signal reconstruction operations to be performed by a centralized network monitoring tool, so the cost in bandwidth and energy consumption is minimal for the sensor nodes. 6
o3_17011 o3_17012 Manlleu o3_17014 Vic Tona o3_17005 o3_17023 o3_17011 o3_17012 Manlleu o3_17014 Vic Tona o3_17005 o3_17023 1.03 -0.26 0.00 -0.28 0.00 0.00 -0.29 -0.21 -0.26 1.08 0.00 -0.29 -0.02 -0.09 -0.18 -0.25 0.00 0.00 0.90 0.00 -0.50 -0.39 -0.01 0.00 -0.28 -0.29 0.00 1.14 0.00 0.00 -0.27 -0.30 0.00 -0.02 -0.50 0.00 0.95 -0.43 0.00 0.00 0.00 -0.09 -0.39 0.00 -0.43 0.94 -0.03 0.00 -0.29 -0.18 -0.01 -0.27 0.00 -0.03 0.98 -0.20 -0.21 -0.25 0.00 -0.30 0.00 0.00 -0.20 0.96 (a) Learned Laplacian matrix with a 18-edge graph. The O3 170xx labels identify different sensor nodes. (b) Graphical representation of the connectivity resulting from the Laplacian matrix. Figure 3: Geographical location of the nodes of the studied data set, dots in blue denote reference stations while dots in yellow denote low-cost sensors. Regarding the effectiveness of this framework1, it should be noted that the performance of data reconstruction will always depend on the existing relationships in the network. In other words, a network with sensors that have no relationships between them cannot benefit from using data from other deployed sensors. Along the same lines, Heimann et al. [43] state that to distinguish between local emissions and the global pattern a dense network of sensors is needed. Moreover, during the cross-validation process used for graph selection it can already be observed whether any sensor in the network can be reconstructed less efficiently by looking at its cross-validation metric. In addition, as more sensors in the network have gaps in the data, the performance may also deteriorate as fewer sensors measured means fewer neighbors available for reconstruction. 5. Data set For the study of the different applications for a network of sensors for monitoring pollution levels, we use data [44] obtained by the H2020 CAPTOR project2. During this project, sensing nodes were deployed in three testbeds in Spain, Austria, and Italy [2]. In this paper, we focus on the nodes deployed in Spain, which included up to four SGX Sensortech MICS 2614 metal-oxide O3low-cost sensors, as well as a temperature and a relative humidity sensor in each node. In addition to the equipment to measure pollution concentrations, the node had an Arduino Yun to process the measurements, a 3G modem to send the data to a central database, and a power supply. All together composed a sensing node capable of measuring O3levels and obtaining measurements every 30 minutes. The data set3used has the following characteristics: 1A python implementation of the data reconstruction framework can be found at http://sans.ac.upc.edu/?q=node/231. 2https://www.captor-project.eu/ 3The data set has been opened [44] and published in the Zenodo platform http://doi.org/10.5281/zenodo.4570449. • 2612 samples between the months of July and September of 2017, • Three reference stations called Manlleu, Vic and Tona, • Eight sensing nodes: three of the sensing nodes were placed beside the reference stations and five in the area in volunteer houses. The three sensor nodes placed at reference stations were used as baseline nodes to compare their measurements with the reference stations. • The average daily concentration of O3in the area during the summer is around 80 µgr/m3with peaks that can reach 150 µgr/m3[7]. This data set is unique in that it includes data taken from a real deployment of low-cost air pollution sensors in conjunction with official reference stations, and therefore allows the study of all three applications mentioned above. Although the size of the network is small, the aim of this paper is to show the feasibility of these techniques to solve the three cases. As proved in [38, 40] the graphical learning methods scale well, and the signal reconstruction methods only use the neighborhood of the target node which is small since the graph topology inference method promotes sparse Laplacian matrices. Figure 3.b) shows the location of these nodes over the deployment area: blue dots denote the reference stations -Manlleu is located at the top, Vic at the middle, and Tona at the bottom- and yellow dots denote low-cost sensor nodes. All sensing nodes underwent an in-situ calibration process at the nearest reference station of the deployment location using multiple linear regression (MLR) algorithm [2]. The nodes were then deployed in volunteer houses. Three of the nodes were kept in each of the reference stations and have been used in theoretical calibration studies [7, 10, 16, 18, 39]. 7
6. Results In this section, we will show the results for the different scenarios explained in section 3 applied to the CAPTOR platform data sets. As three of the sensors remained at the reference stations of Manlleu, Vic, and Tona during the deployment period, they are the object of study since the reference values of pollution at these locations are available. As explained in section 4, we will use the smoothness criterion as the graph learning method to obtain the Laplacian matrix, and the interpolated graph regularization as the semi-supervised signal reconstruction method [41]. Thus, the data are divided into 66% for training, where the cross-validation procedure is carried out to find the Laplacian, and the resulting models are applied to the remaining test set. To evaluate the performance in the three cases presented in section 3, we have to compare the estimated values with the signal of the node being reconstructed. To do this, we consider three comparison scenarios: •Scenario 1: we study the signal reconstruction of a sensor that is placed in a reference station, and use all other sensors not placed in reference stations and reference stations, not including the station where the target sensor is placed, to reconstruct the signal. •Scenario 2: we consider the signal reconstruction of two sensors placed in reference stations, and we use the rest of the sensors and only one of the reference stations, not including the stations where the target sensors are placed, to reconstruct both signals simultaneously. •Scenario 3: we analyze reconstructing the signal of the three sensors that are placed in all reference stations, and use all other sensors and none of the reference stations to reconstruct the signals simultaneously. The objective of these scenarios is to consider the quality of the reconstruction in any of the three cases, considering that there are reference stations with precise values that help in the reconstruction of the signal of various nodes simultaneously, and considering that we are eliminating these precise values until only low-cost sensors help in the reconstruction of the signal. In addition, the reference station where the target sensor is placed never participates in the signal reconstruction. Thus, we can compare the estimated value in all three cases in any of the three scenarios with the value measured by the reference station. Both graph learning and data reconstruction are performed offline in order to simulate the different applications. To the best of our knowledge, no similar data reconstruction frameworks are available in the literature where different postprocessing techniques for low-cost air pollution sensors can be carried out. Nevertheless, there exist task-specific algorithms to deal with missing value imputation and signal reconstruction. Therefore, we take as a baseline for comparison, the data reconstruction by means of probabilistic matrix factorization (PMF) [29]. In addition, we also compare with the recently defined spatio-temporal missing value imputation by Sobolev norm graph signal reconstruction using a distance-based graph [28]. 6.1. Learning the graph To illustrate an example of graph construction we show the particular case of learning the graph with three reference stations and five low-cost sensor nodes. This graph can be applied for Case A, missing value imputation in any of the eight nodes, or for Case B, predicting a virtual sensor in the network. The virtual sensor can be located anywhere in the network where there is a reference station or a low-cost sensor. We take the training data from the three reference stations and the five lowcost sensors that are not located at any reference station, we perform the 5-fold cross-validation to obtain the best hyperparameters, and we learn the Laplacian matrix using the smoothness criterion. Figure 3.a) shows the learned Laplacian matrix for case B. The result is an 18-edge graph whose connectivity map is shown in Figure 3.b). 6.2. Missing value imputation Here we explore the ability to predict missing data from a sensor given its neighbors, Figure 1.a) Case-A. Therefore, we reconstruct the signal of the sensors that are being studied, considering the case that in the estimation phase the sensor does not give measurements or gives wrong measurements. We take the test data from the target sensor and randomly lose a percentage of the data. In this way, we simulate that the sensor has lost data and we can compare the model reconstruction with the original data that the sensor would have estimated if it did not have losses. For scenarios 2 and 3 we consider respectively data losses in two and three of the sensors located in the reference stations. Figure 4.a) shows the RMSE when a sensor (in this case Manlleu sensor) loses data completely at random (MCAR) and we use the framework shown in Figure 1 Case A and two state- of-the-art methods to complete the lost data. The RMSE compares the predicted data with the model against the data obtained by the low-cost sensor, so if there are no losses, this RMSE has to be zero. As it can be seen in Figure 4.a), the RMSE value increases with the percentage of losses for all methods. The extreme case is a 100% of lost data that would correspond to the case of obtaining the values for a virtual sensor, and its error corresponds completely to the imputation method performance. In general, the actual percentage of data lost in a reference station is usually low, 2-3% of data loss per station [10], but as the size of the network increases the chances of having an incomplete sample increase. However, there may be situations where the sensor reports incorrect data involving a higher percentage, such as a malfunction that lasts until the node is repaired. It can be seen that the PMF has a similar performance to the proposed method, with worse performance for large missing ratios. The Sobolev-based method is able to improve the imputation performance of our proposed framework for low missing rates. This result makes sense since Sobolevbased method takes into account the spatio-temporal correlations, so for small missing completely at random gaps (i.e., potentially non-consecutive) the temporal relationships allow to improve the estimation with respect to the proposed framework. Nevertheless, the disadvantage of these methods (matrix 8
0 25 50 75 100 % Missings 0 10 20 30 40 Avg. RMSE ( μgr / m 3 ) Missing value imputation: scenario 1 Proposed Sobolev PMF 0.0 0.2 0.4 0.6 0.8 1.0 Avg. R 2 (a) Imputation results for Manlleu sensor. 0 25 50 75 100 % Missings 0 10 20 30 40 Avg. RMSE ( μgr / m 3 ) Missing value imputation: scenario 2 Proposed Sobolev PMF 0.0 0.2 0.4 0.6 0.8 1.0 Avg. R 2 (b) Imputation results when both Manlleu and Vic low-cost sensors have missing data. 0 25 50 75 100 % Missings 0 10 20 30 40 Avg. RMSE ( μgr / m 3 ) Missing value imputation: scenario 3 Proposed Sobolev PMF 0.0 0.2 0.4 0.6 0.8 1.0 Avg. R 2 (c) Imputation results when the three sensors have missing data. Figure 4: Missing value imputation performance case as a percentage of the missing data. The curve in orange is the average R2and the gray curve is the average RMSE obtained with the three different methods. Shaded area corresponds to the mean 95% confidence interval. Horizontal axis indicates the total percentage of samples lost by the sensor. 2017-07-01 2017-07-15 2017-08-01 2017-08-15 2017-09-01 2017-09-15 0 50 100 150 200 O 3 ( μgr / m 3 ) Test Set Missing value imputation: Manlleu scenario 1 Manlleu sensor Manlleu 20% losses reconstruction (a) Manlleu sensor reconstruction in scenario 1. Test RMSE w.r.t low-cost sensor of 5.32 µgr/m3and test MAE of 1.80 µgr/m3with 20% of losses. 2017-07-01 2017-07-15 2017-08-01 2017-08-15 2017-09-01 2017-09-15 0 50 100 150 200 O 3 ( μgr / m 3 ) Test Set Virtual sensing: Manlleu scenario 1 Manlleu Ref.Stat. Manlleu reconstruction (b) Manlleu reference station reconstruction in scenario 1. Test RMSE of 11.92 µgr/m3and test MAE of 8.67 µgr/m3. 2017-07-01 2017-07-15 2017-08-01 2017-08-15 2017-09-01 2017-09-15 0 50 100 150 200 O 3 ( μgr / m 3 ) Test Set Data fusion: Manlleu scenario 1 Manlleu sensor Manlleu Ref.Stat. Manlleu reconstruction (c) Manlleu reference station reconstruction in scenario 1 using the in-situ sensor. Test RMSE of 9.55 µgr/m3and test MAE of 7.11 µgr/m3. Figure 5: Data reconstruction framework examples of the different applications applied to the Manlleu low-cost sensor (missing value imputation) and reference station (virtual sensing and data fusion) estimation. completion methods) is that they do not adapt naturally, or their performance is not as good, in real-time imputation where all the data are not available a priori. As the percentage of missings increases the proposed framework performs better since it does not include the temporal component, the extreme case being that of 100% of missings, it can be seen as a case of missings at random (MAR), where the proposed framework is able to improve the RMSE of the Sobolev-based method by 3.50 µgr/m3. Thus, in the case of MAR missings (e.g, sensor failure during some time), the proposed framework works better. In the case of 100% of losses, the reconstruction using the proposed framework obtains RMSEs of 12.00, 11.09, and 12.85 µgr/m3 and MAEs of 9.26, 8.62, and 10.08 µgr/m3, for Manlleu, Vic and Tona sensors. Figure 4.b) and .c) show cases where more than one sensor has losses during the same instant of time, which makes prediction difficult in a sensor because it decreases the number of sensors in the vicinity that can participate in the reconstruction of the signal. With two sensors with missing data, Figure 4.b), the RMSE still remains similar to scenario 1, but with three sensors, Figure 4.c), the difficulty of the imputation increases. As for the performance of the three methods the same trends as in the case of missings in a single sensor are observed, where as the ratio of missings increases the gap between the error of the Sobolev-based and the proposed framework increases, being the proposed framework the most effective. However, two aspects should be noted: i) in general [10], the percentage of missing data at the sensor is low, at around 2-3%, and ii) this impact would be compensated by the average neighborhood size. We consider this situation as a challenge to investigate with a real data set with a greater number of low-cost sensors. Finally, the figure 5.a) shows the predicted data with the proposed framework with a 20% loss in the Manlleu low-cost sensor, orange curve, compared to the data of the low-cost sensor, yellow 9