# Performance Analysis of Two-Way Satellite-Terrestrial Relay Network with SWIPT
## 3 System Performance Analysis
### Instantaneous BER for SPNC
#### 3.1.1 Case 1  
In the first case, we assume the \(S_{1}\)--\(R\) link channel gain is better than the \(S_{2}\)--\(R\) link channel gain in a block transmission time. The numerical relationship of the links are as follows:  
\[\Big{|}g\sqrt{P_{2}}/h\sqrt{P_{1}}\Big{|}=\Big{|}\omega_{0}e^{i\phi}\Big{|}<1 \tag{9}\]  
Given channel gains, the instantaneous BER of PNC protocol at the mobile terminal relay during the first time slot is written as:  
\[p_{MA}^{mc}\equiv\frac{1}{2}[P(\hat{m}=1|m_{1}\oplus m_{2}=0)\,+\,P(\hat{m}=0 |m_{1}\oplus m_{2}=1)\,] \tag{10}\]  
The instantaneous BER of SND protocol at the mobile terminal relay during the first time slot is written as:  
\[p_{MA}^{end}\equiv\frac{1}{2}[P(\hat{m}=1|m_{1}=0)\,+\,P(\hat{m}=0|m_{1}=1)\,] \tag{11}\]After adopting [PERSON]'s integral used in [26], we can obtain \(p_{MA}^{mc}\) as follows:  
\[\begin{array}{ll}p_{MA}^{mc}=Q(\sqrt{\frac{2P_{1}|g|^{2}}{W\sigma^{2}}})+\frac {1}{2}\left[I_{ [PERSON]}^{pnc}-Q(\sqrt{\frac{2(2\sqrt{P_{1}}|h|\cos\phi+\sqrt{P_{2}}|g|)^{2}}{W \sigma^{2}}})\right.\\ \left.+Q(\sqrt{\frac{2(2\sqrt{P_{1}}|h|\cos\phi-\sqrt{P_{2}}|g|)^{2}}{W\sigma^{ 2}}})\right)\right]\\ \end{array} \tag{12}\]  
where \(I_{ [PERSON]}^{pnc}\) is as follows:  
\[\begin{array}{ll}I_{ [PERSON]}^{pnc}&=I_{ [PERSON]}(\sqrt{P_{1}}|h|,\sqrt{P_{2}}|g|,\frac{\pi}{2}-\theta+\phi,\theta-\frac{\pi}{2}) \\ &+I_{ [PERSON]}(2\sqrt{P_{1}}|h|\cos\phi+\sqrt{P_{2}}|g|,\sqrt{P_{1}}|h|+2\sqrt{P_{2 }}|g|\cos\phi,\pi-\
u,\phi-\pi+\
u)\\ &-I_{ [PERSON]}(\sqrt{P_{2}}|g|,|2\sqrt{P_{2}}|g|\cos\phi-\sqrt{P_{1}}|h|,\frac{ \pi}{2}-\theta,\theta-\frac{\pi}{2}+\phi)\\ &-I_{ [PERSON]}(|2\sqrt{P_{1}}|h|\cos\phi-\sqrt{P_{2}}|g|,|\sqrt{P_{1}}|h|,\phi+ \alpha,-\alpha)\\ \end{array} \tag{13}\]  
where \(I_{ [PERSON]}(a,b,c,d)\) is written as:  
\[\begin{array}{ll}I_{ [PERSON]}(a,b,c,d)=\frac{1}{2\pi}\int_{0}^{c}\exp\left[- \frac{a^{2}}{2\sigma^{2}\sin^{2}\varphi}\right]d\varphi+\frac{1}{2\pi}\int_{ 0}^{d}\exp\left[-\frac{b^{2}}{2\sigma^{2}\sin^{2}\varphi}\right]d\varphi\\ \end{array} \tag{14}\]  
where angle parameters are defined as: \(\theta=\arctan((\sqrt{P_{1}}|h|-\sqrt{P_{2}}|g|\cos\phi)/(\sqrt{P_{2}}|g|\sin \phi))\), \(\omega=\arccos\left[\cos\theta\sqrt{P_{1}|h|^{2}-2\sqrt{P_{1}P_{2}}|h|g|\cos \phi+P_{2}|g|^{2}/\left(\sqrt{P_{2}}|g|\right)}\right]\), \(\alpha=(3\pi/2)\)\(-\phi-\theta-2\omega\) and \(\
u=(\pi/2)-\phi+\arctan((\sqrt{P_{2}}|g|\sin(\theta-\phi)/\cos\theta+2\sqrt{P_{2 }}|g|\sin\phi)/(\sqrt{P_{1}}\)\(|h|+2\sqrt{P_{2}}|g|\cos\phi))\).  
Similarly, \(p_{MA}^{snd}\) can be obtained as follows:  
\[\begin{array}{ll}p_{MA}^{snd}=\frac{1}{2}\left[Q(\sqrt{\frac{2B^{2}}{W\sigma ^{2}}})+Q(\sqrt{\frac{2A^{2}}{W\sigma^{2}}})-I_{ [PERSON]}^{snd}\right]\\ \end{array} \tag{15}\]  
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_{2}}|g|\cos(\pi-\theta-\omega)\) and \(I_{ [PERSON]}^{snd}\) is as follows:  
\[\begin{array}{ll}I_{ [PERSON]}^{snd}&=I_{ [PERSON]}(B,\sqrt{P_{1}}|h|,\frac{3\pi}{2}-2\theta-\omega,\theta-\frac{\pi}{2}-\phi) \\ &+I_{ [PERSON]}(\sqrt{P_{1}}|h|+2\sqrt{P_{2}}|g|\cos\phi,B,\pi-\
u-\phi,\
u-\theta- \omega)\\ &-I_{ [PERSON]}(A,|2\sqrt{P_{2}}|g|\cos\phi-\sqrt{P_{1}}|h|,\frac{\pi}{2}-\omega, \frac{\pi}{2}+\phi-\theta)\\ &-I_{ [PERSON]}(\sqrt{P_{1}}|h|,A,\alpha,\omega-\frac{\pi}{2})\\ \end{array} \tag{16}\]  
The instantaneous BER of PNC and SND protocols at the satellite source node and user source node during the second time slot are written as, respectively:  
\[\begin{array}{ll}p_{BC,S_{1}}^{mc}=Q(\sqrt{\frac{2P_{R}|h|^{2}}{W\sigma^{2} }}),\ p_{BC,S_{2}}^{mc}=Q(\sqrt{\frac{2\rho P_{R}|g|^{2}}{W\sigma^{2}}})\\ \\ \end{array} \tag{17}\]  
\[\begin{array}{ll}p_{BC}^{snd}=Q(\sqrt{\frac{2\rho P_{R}|g|^{2}}{W\sigma^{2} }})\\ \end{array} \tag{18}\]