# Evaluation of the Use of Compressed Sensing in Data Harvesting for Vehicular Sensor Networks
## 5 Evaluation
### Reconstruction of the Data  
In this paper, we have put our interest in analyzing the goodness of CS to consider it an excellent approach to harvest information in the scope of VSNs. This section provides an overview of the reconstruction process performed by CS without detailing its operations. We have used the Bayesian Compressive Sensing technique [10] to achieve the reconstruction, but there are other CS-based techniques already mentioned in Section 2 which provide similar results. So, for the sake of this example, we have used the data collected of one of the harvesting operations from one execution of the simulations with density 15 (according to Table 6) in Matlab [38] to reconstruct the original data, that is the real values measured by the nodes, using the code of BCS using a relevant vector machine (RVM)([[http://people.ee.duke.edu/](http://people.ee.duke.edu/)]([http://people.ee.duke.edu/](http://people.ee.duke.edu/)) lcarin/BCS.html). Initially, we set the temperature in the scenario according to a real temperature map of the city of Murcia to be the most realistic as possible. From this map, we extracted a matrix of temperature, in \({}^{\circ}\)C, that corresponds to the Table 8. So, we defined a RoI of \(5~{}\times~{}5\) cells covering the whole map indicated in Figure 11.  
Given that the temperature data change gradually, and therefore new values are related to current ones, (for this specific examples it varies within the range of 28.6-30.2 \({}^{\circ}\)C), we have selected a representation matrix consisting in the variance divided by the average of this latter. Let us explain it by the Table 9  
Firstly we need to map the temperature measured in a previous moment before beginning all the gathering process. So, in Table 9, we have identified all the RoI cells by the pair (row, column) which corresponds to the first column, as well as, all these temperature values that correspond to the second column. Taking these values, we calculated their variance, calculating also the average of them. Finally, we have built our representation matrix by dividing the variance per the calculated average. The result is the 3 rd column of the table, but for the sake of seeing it as a matrix we present it in Table 10.  
In order to prove that this representation matrix sparsifies the data, we have generated the last column of Table 9, which is the projection of the values of the last but one column with the values of the representation matrix. \begin{table}
\begin{tabular}{c c c c c} \hline \hline  & \multicolumn{4}{c}{**Original Data**} \\ \hline
30.00 & 29.80 & 29.90 & 30.20 & 30.00 \\ \hline
29.70 & 29.60 & 29.20 & 29.00 & 29.70 \\ \hline
28.90 & 28.60 & 28.90 & 29.00 & 28.90 \\ \hline
29.50 & 29.80 & 29.90 & 30.00 & 29.50 \\ \hline
29.80 & 29.90 & 30.10 & 30.00 & 29.80 \\ \hline \hline \end{tabular}
\end{table} 
Table 8: Table representing a RoI of the scenario which is divided into 5 rows and 5 columns. Each of the cell corresponds to a specific area of the scenario whose real values is represented in \({}^{\circ}\)C.  
Figure 16 show the temperature values obtained in two different moments (t \(-\) 1 and t), as well as the projection of the values obtained in t onto the representation matrix. As we can see, only a few of this projection contain relevant information, fulfilling this way the sparsity requirement for the application of CS. \begin{table}
\begin{tabular}{c c c c c} \hline \hline  & \multicolumn{3}{c}{**Representation Matrix**} \\ \hline
1.4428 & 1.1992 & 1.8647 & 0.5470 & 0.0508 \\ \hline
0.3950 & 0.0229 & 0.0396 & 1.8937 & 0.2730 \\ \hline
0.9363 & 1.5067 & 5.6303 & 2.9788 & 0.0582 \\ \hline
0.5952 & 0.2955 & 0.6199 & 0.1778 & 1.5991 \\ \hline
0.1602 & 0.1359 & 1.7788 & 0.7610 & 0.0375 \\ \hline \hline \end{tabular}
\end{table} 
Table 10: Representation matrix to sparsify the measurements. \begin{table}
\begin{tabular}{|c|c|c|c|c|c|} \hline
**Matrix Cell (r,c)** & **Temp.