## 4 Rate-Distortion Analysis of Using CS Encoding in WSN
### Energy Consumption Evaluation of a Multi-hop CS-based WSN: A Case Study  
In this experiment, we consider that a multi-hop fifteen-nodes WSN is monitoring a temperature signal. A sensor node, located in the position of node \(S_{47}\) from [7], \((39.5,14)\) in meters, collects temperature samples of the environment and transmits the measurements to the sink node (\(S_{0}\)), located in the \((0.5,17)\) coordinates (these coordinates are in meters and relative to the upper right corner of the lab.) using multiple hops. Since we consider a multi-hop WSN, the other thirteen nodes are used as routers to forward the packets from the sensor to the sink. In each simulation run, the position of the thirteen routers are drawn from the remaining nodes. We have performed 10 simulation runs. Figure 4: Rate-distortion convex hulls for the reconstruction of temperature signal with LASSO varying the length of monitored signal block (\(N\)). TrueTime 1.5 [44] is used to perform the simulations, the IEEE 802.15.4 standard [45], referred to as ZigBee and widely used in WSNs, is considered for communication between nodes and the AODV (_Ad hoc On-Demand Distance Vector_) routing protocol is used by routing nodes. We consider a state-based energy model for the sensor node. Roughly, each node can perform some basic tasks when active: To measure, to process, to transmit, or to receive data. Each one of these operation modes is associated to a specific energy consumption, based on the time period in which the sensor node stays in those modes. For details please refer to [46], in which authors proposed DECA, a Distributed Energy Conservation Algorithm for WSN. Sensor nodes that run DECA at their application layer consider the known past (previously measured and transmitted samples) to predict the instant of next transmissions, by using a linear predictor. Then, sensor nodes save energy by managing the necessity for transmissions, based on the variation rate of the monitored signal. The sink uses a first-order interpolator to reconstruct the original signal from the received data. Considering the transmission of a temperature signal (\(N=512\)) using \(M=14\) entropy-coded-CS measurements quantized using \(B\)= 4, 6, 8, and 10 bits, Table 1 shows the transmission rate (in bits/sample), the NMSE (in dB) and the energy (in Joules) consumed by the sensor node (transmitter). As expected, one can observe that the distortion (NMSE) decreases as the rate increases (in bits per sample). On the other hand, more energy is consumed by sensor nodes, since more bits are transmitted by entropy-coded-CS measurements. This clearly shows the interdependence among quantization, distortion, and energy consumption. We now compare the CS framework against DECA [46] with respect to the energy consumption and the NMSE of the reconstructed signal. Figure 5 shows the NMSE (in dB) of the reconstruction of \(N=512\) samples of a temperature signal and the energy consumption (in Joules) of the sensor node (transmitter) after the transmission of the \(M\) measurements/coefficients. Black curves show the results for CS framework, varying the amount of transmitted measurements (\(M\)), and each point presents the NMSE value for \(B=4\), \(B=6\), \(B=8\), and \(B=10\) bits. The red curve shows the results for DECA, with the points for \(\delta=1\%\), \(\delta=0.1\%\), and \(\delta=0.01\%\). The \(\delta\) parameter is a threshold imposed by DECA for the maximum relative error in the reconstruction of the original signal. Smaller values of \(\delta\) tend to improve the reconstruction of the monitored signal (with the decrease in the NMSE), since more transmissions are required. Furthermore, DECA uses 8 bits for each transmitted measurement. It can be observed that CS provides a better reconstruction of the monitored signal for most of the results of Figure 5. This is so because there is a specific recovery algorithm (LASSO) used in the CS scheme, while in DECA the sink uses a simple first-order interpolator to reconstruct the received signal.