## 4 Rate-Distortion Analysis of Using CS Encoding in WSN
### Impact of Coefficient (Packet) Loss  
So far, we have considered that a sensor node \(S_{i}\) transmits its quantized measurements \(\mathbf{y}_{q_{i}}=[y_{q_{i}}[1],y_{q_{i}}[2],\ldots,y_{q_{i}}[M]]\) and that all are available for signal reconstruction. However, as previously discussed it is inherent to WNS that a part of the transmitted coefficients be lost. Consequently, the sink node receives \(L\) measurements (\(L\leq M<N\)), i.e., \(\mathbf{y}_{r_{i}}=[y_{r_{i}}[1],y_{r_{i}}[2],\ldots,y_{r_{i}}[L]]\).  
If each entry \(y_{q_{i}}[k]\) is transmitted within a data packet, in the case one packet is lost then only one measurement is missed. Once transmitting a measurement within a packet, each packet loss results an erased coefficient [47]. In [48], orthogonal projections are used in the transmitter for compensating erasures, however [48] considers a transmitter-aware scheme, in which the occurrence of erasures is known by the transmitter in order to recover erasure errors by subspace projection--which may be hard to implement. Several transmission protocols include sequence numbers in the packets; this is indeed the case for the IEEE 802.15.4 standard (which we consider) [49; 50]. The sequence numbers allow to reorder segments in the transport layer and to identify lost frames in the link layer. As a result, in the CS-encoded WSN monitoring framework, at the sink one can easily prune the sensing matrix rows corresponding to lost coefficients (lost packets) before reconstruction.  
For the experiments, we consider that the WSN is monitoring temperature, and that \(N=512\) blocks are transmitted using varying bit-depths (\(B\)) and number of coefficients (\(M\)). The number of CS measurements used ranges from \(M=8\) to \(M=256\), in steps of 2; and bit-depths \(B\) vary within the set {4,5,6,7,8,9,10}. Different packet loss ratios are considered. Figure 6 shows the resulting RD performances for some of them, along with the optimal RD curve (obtained from the convex hull of the rate-distortion points presented in Section 4.2, which corresponds to 0% packet loss ratio). Figure 6 presents the curves for 10%, 30%, and 50% packet loss ratios (similar results were obtained for 20% and 40% packet loss ratios.), which are averages on 300 random runs.  
To evaluate the impact of the packet loss, we employ the Bjontegaard Delta \(\Delta BD\)--a metric widely used in audio and video coding in order to evaluate average RD performance differences between two encoders [51; 52]. Table 2 shows the \(\Delta BD\) between the ideal case (no-losses or 0% packet loss ratio) and the cases undergoing different packet loss ratios; the \(\Delta BD\) of the Normalized Mean Squared Error (NMSE) between the curves in Figure 6 increases as more packet are lost, however, in any case the performance deterioration is very mild as reported by the \(\Delta DB\) of the NMSE being smaller than 2 dB.  
Figure 5: A comparison of the energy consumption between both distributed energy conservation algorithm (DECA) and CS schemes, applied to the reconstruction of \(N=512\) samples of a temperature signal.  
The ability of the CS framework to perform reasonably as far as enough coefficients are used to encode the signal translates into resilience against packet loss (coefficient erasures). This produces the behavior in Figure 6 and Table 2. From an energy-efficiency point of view, this is significant, since retransmissions can be avoided without largely impacting signal quality. The presented results corroborate the \"democracy property\" of CS, which states that all measurements contribute with the same amount of information [53]. If all CS measurements contribute with the same amount of information and if the sink knows which coefficients are missing, then one simply ignores them when reconstructing the signal.