## 4 System Model
### Bose-Chaudhuri-Hocquenghem (BCH) Coding in Rayleigh Fading on Node i  
In this subsection, a closed-form expression for BCH coding in Rayleigh fading is derived. The probability of error of BCH coding in Rayleigh fading on node i can be written as  
\[P_{ei}=\int_{0}^{+\infty}\ P_{BCH}.p_{\gamma}.d\gamma \tag{3}\]  
where  
\[P_{BCH}=Q.\sqrt{2.R_{c}.\gamma} \tag{4}\]  
and,  
\[p_{\gamma}=\frac{1}{\overline{\gamma}}exp^{-\frac{\gamma}{\overline{\gamma}}} \tag{5}\]  
Substituting expression (4) and expression (5) into expression (3) yields,  
\[P_{ei}=\int_{0}^{+\infty}(Q\sqrt{2.Rc.\gamma}).\frac{1}{\overline{\gamma}}exp^ {-\frac{\gamma}{\overline{\gamma}}}d\gamma \tag{6}\]  
In [15] (Equations (A.35) and (A.36), pp. 114, 134)  
\[Q\sqrt{2.x}=Q(x)\]  
Using this substitution,  
\[Q\sqrt{2.(2.\gamma.Rc)}=Q(2.Rc\gamma)\]  
where \(x=Q(2.Rc.\gamma)\) Substituting the above expression in expression (6) yields  
\[P_{ei}=\int_{0}^{+\infty}Q(2.Rc.\gamma).\frac{1}{\overline{\gamma}}.exp^{- \frac{\gamma}{\overline{\gamma}}}d\gamma \tag{7}\]  
Converting \(Q\) function into an error function gives [16] (Equation (2.55), p. 56)  
\[Q(x)=\frac{1}{2}.erfc(\frac{x}{\sqrt{2}})\]  
where \(x=(2.Rc.\gamma)\) Substituting x in above expression gives us  
\[Q(2.Rc.\gamma)=\frac{1}{2}.erfc((2.R_{c}.\gamma)/\sqrt{(}2))\]  
Substituting the above expression into Equation (7) gives  
\[P_{ei}=\int_{0}^{+\infty}\frac{1}{\overline{\gamma}}.exp^{-\frac{\gamma}{ \overline{\gamma}}}.\frac{1}{2}.erfc(2.R_{c}.\gamma/\sqrt{2}) \tag{8}\] \begin{table}
\begin{tabular}{c c} \hline
**Parameter** & **Value** \\ \hline P\({}_{\rm t}\) & 10 dB \\ G\({}_{\rm tx}\) & 20 dB \\ G\({}_{\rm rx}\) & 20 dB \\ N\({}_{\rm t}\) & 2 \\ R\({}_{\rm c}\) & 0.9 \\ NF & 6 dB \\ \hline \end{tabular}
\end{table} 
Table 3: SNR simulation parameters. Applying integration by parts gives  
\[ \begin{split} P_{e}&=\frac{1}{\overline{\gamma}}exp^{- \frac{\gamma}{\overline{\gamma}}}.\int_{0}^{+\infty}\frac{1}{2}erfc(2.R_{c}. \gamma/\sqrt{2})-\\ &\int_{0}^{+\infty}\frac{d}{d\gamma}(\frac{1}{\overline{\gamma} }.exp^{-\frac{\gamma}{\overline{\gamma}}}).\int_{0}^{+\infty}\frac{1}{2}.erfc( 2.R_{c}.\gamma/\sqrt{2})\end{split}  \tag{9}\]  
In [17] (Equation (3), p. 4)  
\[\int_{0}^{+\infty}erfc(ax)dx=\frac{1}{a.\sqrt{pi}}\]  
where \(a=\frac{2.R_{c}}{\sqrt{2}}\) Therefore,  
\[\int_{0}^{+\infty}\frac{1}{2}.erfc(2.R_{c}.\gamma/\sqrt{2})=\frac{1}{2}.\frac {1}{\sqrt{pi}.R_{c}.2/\sqrt{2}} \tag{10}\]  
Plugging expression (10) in expression (9) gives us  
\[ \begin{split} P_{ei}&=(\frac{1}{\overline{\gamma} }exp^{-\frac{\gamma}{\overline{\gamma}}}.\frac{1}{2}.\frac{1}{\sqrt{pi}.R_{c }.2/\sqrt{2}})-\\ &\int_{0}^{+\infty}(\frac{d}{d\gamma}.\frac{1}{\overline{\gamma} }exp^{-\frac{\gamma}{\overline{\gamma}}}).\frac{1}{2}.\frac{1}{\sqrt{pi}.R_{ c}.2/\sqrt{2}}\end{split}  \tag{11}\]  
Applying differentiation gives  
\[ \begin{split} P_{ei}&=(\frac{1}{\overline{\gamma} }.exp^{-\frac{\gamma}{\overline{\gamma}}}.\frac{1}{2}.\frac{1}{\sqrt{pi}.R_{ c}.2/\sqrt{2}})-\\ &\int_{0}^{+\infty}(-\frac{1}{\overline{\gamma}^{\overline{ \gamma}}}.exp^{-\frac{\gamma}{\overline{\gamma}}}).\frac{1}{2}.\frac{1}{\sqrt{pi }.R_{c}.2/\sqrt{2}}\end{split}