# Wireless Energy Harvesting Two-Way Relay Networks with Hardware Impairments
## Appendix A  
Denote \(\gamma_{1}=X\), \(\gamma_{2}=Y\), the PDF of \(X\) and \(Y\) is \(f_{x}(x)=\int_{0}^{\infty}\!\!A_{1}e^{-A_{1}x}\mathrm{dx},x>0\), \(f_{y}(y)=\int_{0}^{\infty}\!\!A_{2}e^{-A_{2}y}\mathrm{dy},y>0\), respectively, according to Lemma 1.  
Figure 13: The effect of \(d_{1}\) on OPS design for DF and AF protocols.  
We first derive the CDF of \(Y_{1R}\), which is given by  
\[\begin{split} F_{Y_{1R}}(t)&=\mathbf{Pr}\left\{Y_{1R}<t\right\} \\ &=\mathbf{Pr}\left\{\frac{(1-\rho)\gamma_{1}}{(\kappa_{1}^{2}(1- \rho)+\kappa_{2}^{2})\gamma_{1}+1}<t\right\}\\ &=\mathbf{Pr}\left\{\frac{(1-\rho)X}{(\kappa_{1}^{2}(1-\rho)+ \kappa_{2}^{2})X+1}<t\right\}\\ &=\mathbf{Pr}\left\{[(1-\rho)(1-t\kappa_{1}^{2})+t\kappa_{2}^{2} ]X<t\right\}\end{split} \tag{10}\]  
From (10), we note that when \((1-\rho)(1-t\kappa_{1}^{2})+t\kappa_{2}^{2}<0\), \([(1-\rho)(1-t\kappa_{1}^{2})+t\kappa_{2}^{2}]X\) is always less equal than \(t(t>0)\), which contribute to \(F_{Y_{1R}}(t)=1\). Whereas, when \((1-\rho)(1-t\kappa_{1}^{2})+t\kappa_{2}^{2}>0\), we have  
\[\begin{split} F_{Y_{1R}}(t)=&\mathbf{Pr}\left\{X< \frac{t}{(1-\rho)(1-t\kappa_{1}^{2})+\kappa_{2}^{2}}\right\}\\ =& 1-e^{-\frac{tA_{1}}{(1-\rho)(1-t\kappa_{1}^{2})+ \kappa_{2}^{2}}}\end{split} \tag{11}\]  
Similar to the derivation of \(F_{Y_{1R}}\), we can obtain \(F_{Y_{2R}}(t)=1-e^{-\frac{tA_{2}}{(1-\rho)(1-t\kappa_{1}^{2})+\kappa_{2}^{2}}}\). Thus, \(F_{Y_{iR}}\) can be rewrite as shown in (21).  
Next, we derive the CDF of \(Y_{R1}\), which is express as follows  
\[\begin{split} F_{Y_{R1}}(t)&=\mathbf{Pr}\left\{Y_{R 1}<t\right\}\\ &=\mathbf{Pr}\left\{\frac{\eta\rho X(X+Y)}{\kappa^{2}\eta\rho X( X+Y)+V_{1}}<t\right\}\\ &=\mathbf{Pr}\left\{\eta\rho(1-t\kappa^{2})X(X+Y)<tV_{1}\right\} \end{split} \tag{12}\]  
It is straightforward that \(F_{Y_{R1}}(t)=1\) when \(t>\frac{1}{\kappa^{2}}\). In addition, when \(t<\frac{1}{\kappa^{2}}\), \(F_{Y_{R1}}(t)\) can be derived as follows  
\[\begin{split}& F_{Y_{R1}}(t)=\mathbf{Pr}\left\{X(X+Y)<\frac{tV_{1}} {\eta\rho(1-t\kappa^{2})}\right\}\\ &=\mathbf{Pr}\left\{Y<\frac{tV_{1}}{\eta\rho(1-t\kappa^{2})}X-X \right\}\\ &=\!\!\int_{0}^{\sqrt{\frac{tV_{1}}{\eta\rho(1-t\kappa^{2})}}}\! \!\int_{0}^{\frac{tV_{1}}{\eta\rho(1-t\kappa^{2})}\frac{1}{\kappa^{2}}-x}\!A_ {1}e^{-A_{1}x}\cdot A_{2}e^{-A_{2}y}\mathrm{d}\mathrm{x}\mathrm{d}\mathrm{y} \\ &=\!\!\int_{0}^{\sqrt{\frac{tV_{1}}{\eta\rho(1-t\kappa^{2})}}}A_{1 }e^{-A_{1}x}(1-e^{-A_{2}(\frac{tV_{1}}{\eta\rho(1-t\kappa^{2})},\frac{1}{ \kappa}-x)})\mathrm{d}\mathrm{x}\\ &=\!\!1\!\!-\!e^{-A_{1}\sqrt{\frac{tV_{1}}{\eta\rho(1-t\kappa^{2} )}}}\!-\!A_{2}\!\!\int_{0}^{\sqrt{\frac{tV_{1}}{\eta\rho(1-t\kappa^{2})}}}e^{-( A_{1}-A_{2})x+\frac{tA_{  
Denote \(\rho_{\min}^{\rm DF}=\min(\rho_{1},\rho_{2})\) and \(\rho_{\max}^{\rm DF}=\max(\rho_{1},\rho_{2})\). By substituting \(\rho_{\min}^{\rm DF}\) and \(\rho_{\max}^{\rm DF}\) into \(I(\rho)\), we obtain two suboptimal values \(I_{\rm sub,min}^{\rm DF}=I(\rho_{\min}^{\rm DF})\) and \(I_{\rm sub,max}^{\rm DF}=I(\rho_{\max}^{\rm DF})\). Notice that \(I(\rho_{\min}^{\rm DF}-\triangle\rho)<I(\rho_{\min}^{\rm DF})\), because in the range of \(\rho\in[0,\rho_{\min}^{\rm DF}]\) both of \(I_{1}(\rho)\) and \(I_{2}(\rho)\) are increasing functions; and \(I(\rho_{\max}^{\rm DF}+\triangle\rho)<I(\rho_{\max}^{\rm DF})\), because in the range of \(\rho\in[\rho_{\max}^{\rm DF},1]\) both of \(I_{1}(\rho)\) and \(I_{2}(\rho)\) are decreasing functions, where \(0<\triangle\rho<1\) and \(\{\rho_{\min}^{\rm DF}-\triangle\rho,\rho_{\max}^{\rm DF}+\triangle\rho\}\in[0,1]\). In the range of \([\rho_{\min}^{\rm DF},\rho_{\max}^{\rm DF}]\), \(I_{1}(\rho)\) and \(I_{2}(\rho)\) have opposite monotonicity; thus there exist only one intersection point within the range of \([\rho_{\min}^{\rm DF},\rho_{\max}^{\rm DF}]\), which is the maximum value of \(I(\rho)\). With the above analysis, we can rewrite \(I(\rho)\) as shown in (42).