# Performance Analysis of Two-Way Satellite-Terrestrial Relay Network with SWIPT
## 3 System Performance Analysis
### Instantaneous BER for SPNC
#### 3.1.2 Case 2  
In the other case, we assume the \(S_{2}\)--\(R\) link channel gain is better than the \(S_{1}\)--\(R\) link channel gain in a block transmission time. The relationship of the links are as follows:  
\[\begin{array}{ll}\left|h\sqrt{P_{1}}/g\sqrt{P_{2}}\right|=\left|\omega_{0}e^ {i\phi}\right|<1\end{array} \tag{19}\]Given channel gains, the instantaneous BER of PNC protocol at the mobile terminal relay during the first time slot is the same with case 1. Therefore, the instantaneous BER of SND protocol at the mobile terminal relay during the first time slot is written as:  
\[p_{MA}^{snd}\equiv\frac{1}{2}[P(\hat{m}=1|m_{2}=0)\,+\,P(\hat{m}=0|m_{2}=1)] \tag{20}\]  
After adopting [PERSON]'s integral, we can obtain \(p_{MA}^{pnc}\) as follows:  
\[\begin{array}{ll}p_{MA}^{pnc}=Q(\sqrt{\frac{2P_{1}|h|^{2}}{W\sigma^{2}}})+ \frac{1}{2}\Bigg{[}l_{\textit{craig}}^{pnc}-Q(\sqrt{\frac{2(2\sqrt{P_{2}}|g| \cos\phi+\sqrt{P_{1}}|h|)^{2}}{W\sigma^{2}}})\\ \hskip 14.226378 pt+Q(\sqrt{\frac{2(2\sqrt{P_{2}}|g|\cos\phi-\sqrt{P_{1}}|h|)^{2 }}{W\sigma^{2}}})\Bigg{]}\end{array} \tag{21}\]  
where \(l_{\textit{craig}}^{pnc}\) is as follows:  
\[\begin{array}{ll}l_{\textit{craig}}^{pnc}&=I_{\textit{craig}}(\sqrt{P_{2}}|g|,\sqrt{P_{1}}|h|,\frac{\pi}{2}-\theta+\phi,\theta-\frac{\pi}{2})\\ &+\,I_{\textit{craig}}(2\sqrt{P_{2}}|g|\cos\phi+\sqrt{P_{1}}|h|,\sqrt{P_{2}}|g| +2\sqrt{P_{1}}|h|\cos\phi,\pi-\
u,\phi-\pi+\
u)\\ &-\,I_{\textit{craig}}(\sqrt{P_{1}}|h|,|2\sqrt{P_{1}}|h|\cos\phi-\sqrt{P_{2}}|g| |,\frac{\pi}{2}-\theta,\theta-\frac{\pi}{2}+\phi)\\ &-\,I_{\textit{craig}}(|2\sqrt{P_{2}}|g|\cos\phi-\sqrt{P_{1}}|h||,\sqrt{P_{2}}| g|,\phi+\alpha,-\alpha)\end{array} \tag{22}\]  
where angle parameters are defined as: \(\theta=\arctan((\sqrt{P_{2}}|g|-\sqrt{P_{1}}|h|\cos\phi)/(\sqrt{P_{1}}|h|\sin \phi))\), \(\omega=\arccos\left[\cos\theta\sqrt{P_{2}|g|^{2}-2\sqrt{P_{1}P_{2}}|h||g|\cos \phi+P_{1}|h|^{2}}/(\sqrt{P_{1}}|h|)\right]\), \(\alpha=(3\pi/2)-\phi-\theta-2\omega\) and \(\
u=(\pi/2)-\phi+\arctan((\sqrt{P_{1}}|h|\sin(\theta-\phi)/\cos\theta+2\sqrt{P _{1}}|h|\sin\phi)/(\sqrt{P_{2}}\)\(|g|+2\sqrt{P_{1}}|h|\cos\phi))\).  
Similarly, \(p_{MA}^{snd}\) can be obtained as follows:  
\[p_{MA}^{snd}=\frac{1}{2}\Bigg{[}Q(\sqrt{\frac{2B^{2}}{W\sigma^{2}}})+Q(\sqrt{ \frac{2A^{2}}{W\sigma^{2}}})-l_{\textit{craig}}^{snd}\Bigg{]} \tag{23}\]  
where \(A=\sqrt{P_{1}|h|^{2}-2\sqrt{P_{1}P_{2}}|h||g|\cos\phi+P_{2}|g|^{2}}\), \(B=A+2\sqrt{P_{1}}|h|\cos(\pi-\theta-\omega)\) and \(l_{\textit{craig}}^{snd}\) is as follows:  
\[\begin{array}{ll}l_{\textit{craig}}^{snd}&=I_{\textit{craig}}(B,\sqrt{P_{2}}| g|,\frac{3\pi}{2}-2\theta-\omega,\theta-\frac{\pi}{2}-\phi)\\ &+\,I_{\textit{craig}}(\sqrt{P_{2}}|g|+2\sqrt{P_{1}}|h|\cos\phi,B,\pi-\
u-\phi, \
u-\theta-\omega)\\ &-\,I_{\textit{craig}}(A,|2\sqrt{P_{1}}|h|\cos\phi-\sqrt{P_{2}}|g||,\frac{\pi} {2}-\omega,\frac{\pi}{2}+\phi-\theta)\\ &-\,I_{\textit{craig}}(\sqrt{P_{2}}|g|,A,\alpha,\omega-\frac{\pi}{2})\end{array} \tag{24}\]  
The instantaneous BER of SND protocol at satellite source node during the second time slot is written as, respectively:  
\[p_{\textit{BC}}^{snd}=Q(\sqrt{\frac{2P_{\textit{R}}|h|^{2}}{W\sigma^{2}}}) \tag{25}\]