# Wireless Energy Harvesting Two-Way Relay Networks with Hardware Impairments
## 3 Ergodic Capacities Analysis
### Capacity of AF Relaying
#### 4.1.2 Case II: \(\rho^{+}\geq\rho^{\rm DF}_{\rm min}\)  
From Proposition 1 and the monotonic of \(R_{\rm MA}(\rho)\), we get that the maximum achievable sum rate exists in the second segment of (44), i.e., \(\rho^{o}\in[\rho^{\rm DF}_{\rm min},\rho^{+}]\). Thus, the OPS value is determined by \(I_{\rm sg}\), \(\rho\in[\rho^{\rm DF}_{\rm min},\rho^{+}]\). Because \(I_{sg}(\rho),\rho\in[0,1]\) is a concave function, there should have three subcases to determine the optimal value by analyzing the location of the extrema of of \(I_{sg}(\rho)\). Denote \(\rho^{\text{ex}}\) as the extrema of of \(I_{sg}(\rho)\), it can be obtained by solving the following quadratic equation  
\[\begin{split}& B_{1}^{\text{ex}}\rho^{2}+B_{2}^{\text{ex}}\rho+B_{3}^ {\text{ex}}=0\\ & B_{1}^{\text{ex}}=\eta\gamma_{\Sigma}V_{n}\kappa_{1}^{2}(1+\kappa _{1}^{2})\gamma_{n}^{2}-\kappa^{2}(1+\kappa^{2})(1+\kappa^{2}\gamma_{n})\eta^{ 2}\gamma_{n}^{2}\gamma_{\Sigma}\\ & B_{2}^{\text{ex}}=-\eta\gamma_{\Sigma}V_{n}[\gamma_{n}^{2}( \Omega\kappa^{2}(1+\kappa^{2})+\kappa_{1}^{2}(1+2\kappa^{2}))+2\gamma_{n}(1+ \kappa_{1}^{2}+\kappa^{2})]\\ & B_{3}^{\text{ex}}=\eta\gamma_{\Sigma}V_{n}[\kappa^{2}(1+\kappa ^{2})\gamma_{n}^{2}+(1+2\kappa^{2})\gamma_{n}+1]-(1+\kappa^{2}\gamma_{n})V_{n }^{2}\end{split} \tag{47}\]  
Through analysis of the locations of the extreme value \(\rho^{\text{ex}}\) of \(I_{sg}(\rho)\), we can get three subcases for Case II.  
* Subcase 1: \(\rho^{\text{ex}}<\rho_{\text{min}}^{\text{DF}}\) Since \(I_{sg}(\rho)\) is a decreasing function in the range of \([\rho^{\text{ex}},1]\), it is easy to obtain that \(I_{sg},\rho\in[\rho_{\text{min}}^{\text{DF}},\rho^{+}]\) is also a decreasing function. Thus in this case, the optimum power splitting ratio is \(\rho^{o}=\rho_{\text{min}}^{\text{DF}}\).
* Subcase 2: \(\rho^{\text{ex}}\in[\rho_{\text{min}}^{\text{DF}},\rho^{+}]\) In this case, \(I_{sg}(\rho)\) is an increasing function in the range of \(\rho\in[\rho^{\text{min}},\rho^{\text{ex}}]\) and is a decreasing function in the range of \(\rho\in[\rho^{\text{ex}},\rho^{+}]\). Thus, \(I_{sg},\rho\in[\rho_{\text{min}}^{\text{DF}},\rho^{+}]\) is a concave function and obtain its maximum at \(\rho^{o}=\rho^{\text{ex}}\).
* Subcase 3: \(\rho^{\text{ex}}>\rho^{+}\) \(I_{sg}(\rho)\) is an increasing function in the range of \([0,\rho^{\text{ex}}]\). So in this case \(I_{sg},\rho\in[\rho_{\text{min}}^{\text{DF}},\rho^{+}]\) is an increasing function of \(\rho\). Its optimum is laid on the border \(\rho^{o}=\rho^{+}\).  
With the aforementioned analysis, we can obtain the optimal power splitting ratio for DF protocol, which is expressed as follows  
\[\rho^{o}=\begin{cases}\rho^{*},&\text{for }\rho^{+}<\rho_{\text{min}}^{\text{DF}} \\ \rho_{\text{min}}^{\text{DF}},&\text{for }\rho^{+}\geq\rho_{\text{min}}^{\text{DF}} \text{ and }\rho^{\text{ex}}<\rho_{\text{min}}^{\text{DF}}\\ \rho^{\text{ex}},&\text{for }\rho^{+}\geq\rho_{\text{min}}^{\text{DF}} \text{ and }\rho_{\text{min}}^{\text{DF}}\leq\rho^{\text{ex}}<\rho^{+}\\ \rho^{+},&\text{for }\rho^{+}\geq\rho_{\text{min}}^{\text{DF}} \text{ and }\rho^{\text{ex}}>\rho^{+}\end{cases} \tag{48}\]