# Reliability Improved Cooperative Communication over Wireless Sensor Networks
## 4 Main Design of RICC
### Preliminary Knowledge
#### 4.2.2 Reliability Model  
Considering the bit errors can be corrected through an FEC if the received Signal-to-Noise Ratio (SNR) is higher than a threshold, denoted as \(SNR_{0}\)[9]; hence, in this case, the delivered packets can be obtained correctly by the sink node. The method for calculating received signal-to-noise ratio (\(SNR_{r}\)) is [9]:  
\[SNR_{r}=h^{2}\ \ \times\ \ \frac{G_{t}G_{r}w^{2}d_{0}^{k-2}}{\left(1+\alpha \right)\left(4\pi\right)^{2}M_{1}N_{f}d^{k}}\ \ \times\ \ \frac{E_{Amp}}{N_{0}} \tag{10}\]  
Since the diameter of the cluster, \(r_{b}\), is quite short, a high data transmission power is not necessary for extremely reliable intra-cluster communications; thus, the MFR within clusters will be set to a small constant value, e.g., \(p_{b}=10^{-6}\). The Probability Density Function (PDF) of wireless channel is:  
\[f(x)=\frac{2x}{\sigma^{2}}\exp\left(\frac{-x^{2}}{\sigma^{2}}\right) \tag{11}\]where \(\sigma^{2}\) is the scale parameter of the distribution. Then, the packet loss probability is as follow  
\[\begin{array}{ll}p_{l}=\Pr(SNR_{r}<SNR_{0})&=\Pr\biggl{(}h\leq\sqrt{\frac{QN_{ pdf}}{E_{Amp}}}\biggr{)}\\ &=1-\exp\biggl{(}-\frac{QN_{0}d^{k}}{E_{Amp}\sigma^{2}}\biggr{)}\end{array} \tag{12}\]  
where  
\[Q=\frac{(1+\alpha)(4\pi)^{2}M_{l}N_{f}SNR_{0}}{G_{t}G_{r}w^{2}d_{0}^{k-2}} \tag{13}\]  
Define the communication constant \(U\) as follows:  
\[U=\frac{\left(4\pi\right)^{2}M_{l}N_{f}}{G_{t}G_{r}w^{2}} \tag{14}\]  
Then,  
\[Q=\frac{(1+\alpha)SNR_{0}}{d_{0}^{k-2}}\ \ \times\ U \tag{15}\]  
Assume that in a certain data collection round, there are \(u\) functioning nodes in a certain transitional cluster. Then, each packet delivered from the previous cluster will not be received successfully by the cluster unless it can be received by at least one of these \(u\) nodes. Therefore, the probability for a packet to be successfully received is \((1-p_{l})^{u}\). Hence, the probability of \(v\) among the \(N\) packets being obtained.  
\[p(u,v)=\left(\begin{array}{c}N\\ v\end{array}\right)\bigl{(}1-(p_{l})^{u}\bigr{)}^{v}p_{l}{}^{u(N-v)} \tag{16}\]  
The payload of each coded packet is the linear combination of the \(M\) original data blocks. However, this decoding constraint cannot always be satisfied because the encoding and re-coding vectors of the \(v\) received packets are generated over a Galois Field randomly. Let \(p_{n,m}\) denote the probability that the rank of an \(n\times m\) matrix generated randomly over a Galois Field is less than \(m\)[31]. thus, its value is as follows:  
\[p_{n,m}=\left\{\begin{array}{ll}1,&\mbox{if }n<m\\ 1-\prod\limits_{x=0}^{m-1}\Bigl{(}1-\frac{1}{q^{k-x}}\Bigr{)}.&\mbox{if }n \geq m\end{array}\right. \tag{17}\]  
As in [9], the Message Fail Delivering Ratio (MFR) is a performance index. From the above discussions, the MFR in one hop of transmission with the packet loss probability \(p_{l}\) and node failure probability \(p_{r}\) can be calculated as:  
\[\begin{array}{ll}MFR_{o}=&\sum\limits_{u=0}^{N}\sum\limits_{v=0}^{N}\left( \begin{array}{c}N\\ u\end{array}\right)\bigl{(}1-p_{r}\bigr{)}^{u}p_{r}^{N-u}\\ &\times\left(\begin{array}{c}N\\ v\end{array}\right)\bigl{(}1-(p_{l})^{u}\bigr{)}^{v}\bigl{(}p_{l}\bigr{)}^{u( N-v)}\times p_{v,M}\end{array} \tag{18}\]  
In particular, when data packet is transmitted from destination cluster to the sink, the MFR is recalculated as:  
\[\begin{array}{ll}MFR_{s}=&\sum\limits_{u=0}^{N-1}\sum\limits_{v=0}^{N} \left(\begin{array}{c}N-1\\ u\end{array}\right)\bigl{(}1-p_{r}\bigr{)}^{u}p_{r}^{N-1-u}\\ &\times\left(\begin{array}{c}N\\ v\end{array}\right)\Bigl{(}1-(p_{l})^{u+1}\Bigr{)}^{v}\bigl{(}p_{l}\bigr{)}^{ (u+1)(N-v)}\times p_{v,M}\end{array} \tag{19}\]