## 4 Simulation Results and Analysis  
In this section, simulation results are performed to present the performance of the proposed power allocation and relay selection scheme. We assume that there are 10 relays in the set and the energy conversion efficiency is \(\eta=0.95\). Moreover, the distance between \(S_{1}\) and \(S_{2}\) is normalized to unit value, and the distance between \(S_{1}\) to \(R_{i}\) is expressed as \(d\). According to the reference [20], the information rate of TWRN is largest when the relay node is located on the midpoint between \(S_{1}\) and \(S_{2}\). Therefore, we assume that \(d=0.5\). Thus, the channel strength of the two channels are \(h_{i}=v_{1}/d^{\alpha}\) and \(g_{i}=v_{2}/(1-d)^{\alpha}\), where \(\alpha\) is the path loss exponent. In this paper, \(\alpha\) is set to 2.5. In addition, two source nodes and the relay node have the same noise variance \(\sigma^{2}\). The SNR can be expressed as \(\text{SNR}=\frac{p_{T}^{\max}}{T}/\sigma^{2}\). To the Monte Carlo experiment, the simulation results are averaged over 1000 independent channel realizations. Simulation parameters are elaborated in Table 1.  
Figure 3 depicts the information rate curves of using different SNRs under various TS factor \(\alpha\). It can be observed that these curves have the same tendency under the different total transmit power constraints. From the trend, the three curves are concave, which demonstrate the accuracy of the analysis in Section 3. As can be seen from Figure 3, the system information rate can achieve 2.67 bps/HZ when the total transmitted power is 15 dB. When the total transmitted power is 20 dB, the system information rate can achieve 3.387 bps/HZ. When the total transmitted power is 25 dB, the system information rate can achieve 4.2 bps/HZ. We note that the optimal TS factor can be found in the range \((0,1)\). The information rate versus SNRin three different schemes is shown in Figure 4. The three schemes are the proposed scheme, the joint resource allocation PS scheme and equal power allocation PS scheme. For the joint resource allocation PS scheme, the power allocation scheme is based on the end-to-end SNRs balancing criterion. The instantaneous SNRs at two source nodes can be formulated as  
\[\gamma_{S1}=\frac{\eta\rho(1-\rho)P_{S2}|h_{i}|^{2}|g_{i}|^{2}}{\left(\eta\rho (1-\rho)|h_{i}|^{2}+\eta\rho|h_{i}|^{2}+(1-\rho)\right)\sigma^{2}} \tag{26}\]  
\[\gamma_{S2}=\frac{\eta\rho(1-\rho)P_{S1}|h_{i}|^{2}|g_{i}|^{2}}{\left(\eta \rho(1-\rho)|g_{i}|^{2}+\eta\rho|g_{i}|^{2}+(1-\rho)\right)\sigma^{2}} \tag{27}\]  
where \(\rho\in[0,1]\) is the PS factor and it is fixed as 0.5. The max-min bidirectional information rate has the maximum when \(\gamma_{S1}=\gamma_{S2}\). Therefore, the optimal power allocation scheme under the total power constraint can be expressed as  
\[P_{S1}=\frac{\eta\rho(2-\rho)|g_{i}|^{2}+(1-\rho)}{2(1-\rho)+\eta\rho(2-\rho) |g_{i}|^{2}+\eta\rho(2-\rho)|h_{i}|^{2}}P_{T}^{\max} \tag{28}\] \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter** & **Value** \\ \hline Path loss exponent & 2.5 \\ The distance between \(S_{1}\) to \(R_{i}\) & 0.5 \\ The distance between \(S_{2}\) to \(R_{i}\) & 0.5 \\ Energy conversion efficiency & 0.95 \\ Number of relay nodes & 10 \\ Monte Carlo experiment & 1000 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Simulation parameters. Figure 3: The information rate versus TS factor. \[P_{S2}=\frac{\eta\rho(2-\rho){|{h_{i}}|}^{2}+(1-\rho)}{2(1-\rho)+\eta\rho(2-\rho){| {g_{i}}|}^{2}+\eta\rho(2-\rho){|{h_{i}}|}^{2}}P^{\max} \tag{29}\]  
Then, we select the cooperative relay node from the relay set, which can maximize the information rate. For the equal power allocation scheme, two source nodes have equal transmission power \(P_{S1}=P_{S2}=P_{T}^{\max}/2\) and the relay selection is random. As shown in Figure 4, the performance of the proposed scheme is better than the other two PS schemes where the SNR ranges from 0 dB to 20 dB.