## 4 Cluster-Based Distributed Compressed Sensing for QoS Routing
### Distributed QoS Routing
#### 4.3.2 Local Reliability Guarantee  
Consider a multi-channel CVSN. The existence of PUs makes each channel have two states: busy and idle, and their transmission rates are different. A redundancy scheme is incorporated in transmission to adapt to varying wireless channel conditions. A cluster head adds an appropriate amount of redundancy to the packet according to the delivery rate of the link. Higher link delivery rate means less redundancy added to packets.  
We consider the CSMA MAC protocol, with which the network is characterized by multihop wireless lossy links. To calculate reliability, we use the packet delivery ratio, the percentage of packets successfully sent to the destination. If we require that each hop on a route should provide the same level of reliability, the required packet delivery ratio from \(v_{i}\) and \(v_{j}\), can be estimated as  
\[P_{i,j}=P^{\frac{1}{N}}\hat{N}_{i,s}, \tag{25}\]  
where \(P\) is the required packet delivery ratio given by the applications and \(\hat{N}_{is}\) can be calculated by  
\[\hat{N}_{i,s}=max\left(\left\lceil\frac{d\left(v_{i},s\right)}{d_{hop}} \right\rceil,1\right). \tag{26}\]  
In Equation (26), the average single hop distance, denoted by \(d_{hop}\) can be estimated as the arithmetic mean of the distance between \(v_{i}\) and all its forwarding neighbor nodes, i.e.,  
\[d_{hop}=\frac{\sum_{v_{j}\in F_{i}}d\left(v_{i},v_{j}\right)}{|F_{i}|}. \tag{27}\]  
In a layered wireless network protocol stack, video frames are split into multiple packets for transmission [38; 39]. Next, we explain how to obtain the required packet delivery ratio, denoted by \(P\). One important problem to be considered in the transmission process of encoded data is whether packets can be decoded successfully at the sink. Hence, the probability that a video frame is successfully decoded, denoted by \(PD\), is introduced as a metric to evaluate reliability. We introduce a frame decodable threshold [40], denoted by \(DT\), to represent the percentage of packets that are needed to decode a frame. Suppose that a video frame \(X\) is packed into \(n\) packets. The probability that at least \(DT\) percent of packets are successfully delivered/received, denoted by \(\omega(X)\), is estimated through \(n\), \(DT\) and \(P\), expressed by  
\[\omega\left(X\right)=\omega\left(n,DT,P\right)=\sum_{i=\left\lceil n\cdot DT \right\rceil}^{n}\left(\begin{array}{c}n\\ i\end{array}\right)\cdot P^{i}\cdot\left(1-P\right)^{n-i}. \tag{28}\]  
A video frame will be decodable if at least \(DT\) percent of the packets are received by the sink. If a video sensor has generated a video frame \(X\), the probability that \(X\) is successfully decoded is expressed as  
\[P_{D}\left(X\right)=\omega\left(X\right)=\omega\left(n,DT,P\right). \tag{29}\]  
The probability that the frame is successfully decoded \(P_{D}(X)\) is correlated with the process of compressed sensing of data, which is limited by the decoded effect of packet, i.e.,  
\[P_{D}\left(X\right)=1-\frac{\left\|x-x^{m}\right\|_{2}}{\left\|x\right\|_{2}}. \tag{30}\]In this work, given a required \(P_{D}(X)\) from an application, the number of packets for \(X(n)\), \(DT\), and \(P\) is estimated and assigned to each packet.