## 4 The Structure Fidelity Data Collection Framework
### Cluster Construction  
Due to the prevalence of spatial correlation in environmental phenomena, the over-deployed sensor nodes used to sense environment will be highly correlated. If we group nodes with similar sense quality into the same clusters, it will be more efficient at exploiting the correlation of data. Naturally, we consider the physical distance as one of the metrics of the close relationship between any two nodes. Many mathematical models of spatial correlated sensor networks data have been established in [29; 30; 31], where the variogram (also called semivariance) that reveals the average square difference between the readings of sensor nodes is used to characterize spatial correlation in data. Given a two dimensional stationary process \(S(x,y)\), where \((x,y)\) is the geographic coordinate, the variogram is denoted as follow:  
\[\gamma=\frac{1}{2}E[(S(x_{1},y_{1})-S(x_{2},y_{2}))^{2}] \tag{9}\]  
For isotropic random processes [32; 33], the variogram depends only on the Euclidean distance \(r=\sqrt{(x_{1}-x_{2})^{2}+(y_{1}-y_{2})^{2}}\) between two nodes. The experiment results in [29] show that the variogram increases quickly with the distance grows. For large distance, the process exhibits a remarkably feature of independent and identically distribution process, where the variogram do not change with distance. Therefore, the distance is a good indicator of correlation between nodes. However, we believe that it is insufficient in real world. The reason is that the phenomenon under observation is often influenced by multiple sources such as room air conditioners, heaters, walls and so on. Even though two nodes are physically close, the correlation between them may be less obvious. We thus consider another statistic named Pearson's coefficient [34; 35] as the supplementary metric to characterize spatial correlation in data. The Pearson's coefficient indicates the degree of linear correlation between two variables \(x\) and \(y\), giving a rang of \([-1,1]\), where 1 is total positive correlation, \(0\) is no correlation, and \(-1\) is total negative correlation. Here each individual sensor node can be regarded as a variable to record the change of observation in the monitored area where the sensor is located. Consequently, the formula for [PERSON]'s coefficient when applied to two sensor variables is  
\[\rho_{xy}=\frac{\sum\limits_{i=1}^{m}(x_{i}-\overline{x})(y_{i}-\overline{y}) }{\sqrt{\frac{\sum\limits_{i=1}^{m}(x_{i}-\overline{x})^{2}}{\sqrt{\sum \limits_{i=1}^{m}(y_{i}-\overline{y})^{2}}}}} \tag{10}\]where \(m\) is the number of reading samples, \(\overline{x}\) and \(\overline{y}\) are the average of reading samples for each sensor node. The Pearson's coefficient can identify how much one variable is linearly associated with another. In other word, the areas sensed by two nodes with larger value of the coefficient have more similar linear relation in term of sensor readings. A known Pearson's distance is defined as  
\[d_{xy}=1-\rho_{xy} \tag{11}\]  
From the fact that the Pearson's correlation coefficient falls between \([-1,1]\), it is seen that the Pearson's distance lies in \([0,2]\). We address the cluster construction problem by using the Euclidean distance as the primary metric and the Pearson's distance between node readings as the secondary metric, where the correlation of sensor nodes is depicts in term of the variance and the linear relation of their readings in the past. Given a node set \(G\), we need to partition \(G\) into \(N\) disjoint clusters \(C\) such that sensor nodes within the same cluster are correlated. The details of the cluster formation applied in the sink are described in Algorithm 1. We define the threshold \(max\_dis\) as a tunable parameter that roughly determines the diameter of a cluster and the number of clusters. The predefined parameter changes inversely with the number of clusters or the percent of nodes being cluster heads, which means that it will be set to a small value when the percent of cluster heads in the network is large and vice versa.