# Evaluation of the Use of Compressed Sensing in Data Harvesting for Vehicular Sensor Networks
## 4 Cs-Vdh
### Design Issues  
Given the complexity of the VSN scenario to broadcast query messages, as well as to send measurements back to the FC, we consider that there exist several design issues worth highlighting in  
Figure 6: CS-Vehicular Data Harvesting (VDH) sequence diagram showing the query distribution and harvesting stages  
this paper. Starting with the distribution of the query message we enumerate the required fields to be transmitted:  
* A sequence number to identify the packet. * The FC address. * The FC location. * The RoI, specified by the location of two opposite corners. * The projection vector. * The number of cells per row. The three four-fields are required for the underlying geocast routing protocol for proper dissemination of the message inside an RoI geographically delimited by the two opposite corners of a rectangle and avoiding the retransmission of duplicated packets thanks to the sequence number. Finally, the two latter fields correspond to the projection vector which is a single row vector related to the representation matrix, and the number of cells per row which helps nodes to map the representation matrix containing a number of cells per row to the single row vector. This is further explained below. As commented in Section 2, the application of CS is based on the multiplication of two vectors of the same size. Since one of the vectors, the projection vector, must be sent within the CSQuery, we have to set its size a priori. For this reason, we decided to divide the RoI into cells, as Figure 7 shows. This way, we can map node locations to the cells of the RoI. This approach provides an extra advantage. If a node receives a data packet from another node and it already has the information of the cell where the node has taken its measurement, which is easily checked by looking at the boolean vector, it only forwards the packet without including new information. Another interesting design issue is the adaptation of the RoI matrix to a vector since CS operates with vectors. To do so, each of the rows of the matrix are concatenated, obtaining a single row vector with all the cells of the matrix as shown in Figure 8. Finally, we insert in the CSQuery message the size of the rows of the original RoI matrix, so that nodes could reconstruct the original RoI. Figure 7: Definition of a RoI with 6 \(\times\) 6 cells. With this last change, the operation is like in the previous CS example allowing us to compress the information of various locations, as exemplified in the following equation. \[y=Ax= \begin{pmatrix}6&2\\ 4&1\end{pmatrix}\begin{pmatrix}x_{1}&x_{2}\\ x_{3}&x_{4}\end{pmatrix} \Rightarrow \begin{pmatrix}6&2&4&1\end{pmatrix}\begin{pmatrix}x _{1}\\ x_{2}\\ x_{3}\\ x_{4}\end{pmatrix}  \tag{4}\]  
\[=6x_{1}+2x_{2}+4x_{3}+1x_{4}=U.\]  
One of the significant advantages that CS provides is that we can combine information at different moments. For instance, assuming the FC has already broadcast a query message in a RoI containing the projection vector \((6,2,4,1)\), if one node, for instance, has the measurement of position (1,1), it can project its value obtaining \(6\times x_{1}\) and transmit it to the following intermediate node. Moreover, the intermediate node can also combine its sensed information, for instance, of position (2,2) just by adding its projected value \(1\times x_{4}\) resulting in a new value \(T=6\times x_{1}+1\times x_{4}\). This suppose a notable compression rate compared to transmitting the two values in the same packet. This is possible because, according to CS, a node can combine its sensed data if the cells to which the data refers has not been included yet. For this reason, a packet must include information about which cells contributed information to the carried data. In order to deal with this problem, we introduce a boolean vector indicating which cells provided information to the combined data. This vector has the same size as the number of cells in the RoI.