## 5 Simulation and Analysis
### Experiment with Synthetic 2-D Data
For the small missing block, suppose the value of point P\({}_{\text{i}}\) is missed, A and B are the nearest neighbors of P\({}_{\text{i}}\), then P\({}_{\text{i}}\) is hard to be recovered via linear combination of A and B. However, for the large missing block, suppose the value of point P\({}_{\text{2}}\) is missed, C and D are the nearest neighbors of P\({}_{\text{2}}\), then it is possible to recover P\({}_{\text{2}}\) via the linear combination of C and D. This implies large block size may help KNN to recover the missing samples for the high-frequency data. This can explain why larger missing blocks lead to lower RMSEs. Figure 11 shows the recovered high frequency data by KNN and the proposed approach under different missing-block-sizes. The missing rate is fixed at 0.3. Obviously, the new method outperforms KNN since KNN fails to recover the data while our method successfully recovers the missing data for different missing-block-sizes. Figure 11: Effect of the missing block size on the estimation quality of Figure 8(a) for missing rate at 0.3. **(a), (b) and (c)** show sensor data with 1 \(\times\) 1, 2 \(\times\) 2 and 4 \(\times\) 4 missing block size, respectively; **(d), (e) and (f)** are the recovered data by KNN corresponding to (a), (b) and (c), respectively; **(g), (h) and (i)** are the recovered data by the proposed approach corresponding to (a), (b) and (c), respectively. Figure 10: Missing sample estimation of a high frequency component with KNN. The solid line represents available samples, where the dash line denotes missing samples. Points **A**, **B** are nearest neighbors of a small missing block, and **C** and **D** are nearest neighbors of a large missing block. Points P1, P2 are missing points to be recovered. Meanwhile, the real WSN data always contain both low frequency components and high frequency components simultaneously. So a 2-D synthetic data with size 64 \(\times\) 64 is generated from 32 nonzero coefficients in the low frequency DCT domain and 32 nonzero coefficients in the high frequency domain, which is shown in Figure 12.  
The recovery RMSE curves of KNN and the proposed approach for the mixed data are shown in Figure 13. Meanwhile, fixing the missing rate at 0.3, Figure 14 compares the visual recovered data by these two methods under different missing-block-sizes. The result on mixed data is in accordance with the simulations on low and high frequency components separately. The only difference is the RMSE curves of KNN under different size of missing blocks become closer to each other. The reason is that when block size becomes larger, KNN's RMSE increases for low frequency components, but decreases for high frequency components. Now since mixed signal contain both low and high frequency components, the two opposite effects cancel out each other. Figure 11: _Cont._  
Figure 6:0 2-D mixed data with size 64 \(\times\) 64 is generated from 32 nonzeros of low frequency DCT coefficients and 32 nonzeros of high frequency DCT coefficients. **(a)** Original data. **(b)** DCT coefficients. The size of the DCT dictionary is 64 \(\times\) 64. The color bar denotes the coefficient value of each atom in DCT dictionary. Figure 6:1 Effect of the missing-block-size on the estimation quality of Figure 11(a) for missing rate\(=\)0.3. **(a), (b) and (c)** show sensor data with 1 \(\times\) 1, 2 \(\times\) 2 and 4 \(\times\) 4 missing block size, respectively; **(d), (e) and (f)** are the recovered data by KNN corresponding to (a), (b) and (c), respectively; **(g), (h) and (i)** are the recovered data by the proposed approach corresponding to (a), (b) and (c), respectively. Figure 6:2 Effect of missing rate and missing block size on estimation quality with mixed sensor data. **(a)** and **(b)** shows the RMSE curve of KNN and the proposed approach, respectively. Error bar stands for the standard deviation with aspect to the repeated 100 times of simulations for the same size of missing blocks and same missing rate.