# Towards Efficient Wireless Body Area Network Using Two-Way Relay Cooperation
## 4 Simulation, Performance Evaluation and Optimal Packet Size  
The analytical and simulation results for PER and EE are presented against distance for various scenarios, including direct and cooperative communication for a packet size of 500 bits. The analysis is performed on the basis of mathematical expressions formulated in Section 3 using MATLAB (R2015a, MathWorks, Natick, MA, USA). The results are obtained by employing extensive Monte Carlo simulations in MATLAB, in order to substantiate the analytical outcome. A binary phase shift keying (BPSK) modulated bit stream grouped into packets is passed over WBAN link for variable hop-length. The link comprises path loss, log-normal shadowing, and AWGN relative to distance. At the end node, the erroneous packets are differentiated from received packets to evaluate PER. The simulation parameters are listed in Table 2[17]. In Figures 2 and 3, PER for in-body and on-body communication, respectively, is shown over varying link length. The PER is improved in the case of cooperative communication compared to direct link. The one-way and two-way relay curves are equally improved from direct link. Furthermore, in two-way relay communication, the data is shared among both nodes i.e., greater number of transmissions with same PER, so, in two-way relay cooperation scenarios, greater reliability is achieved \begin{table}
\begin{tabular}{c c} \hline \hline Data Packet & 500 bits \\ \hline ACK/NACK & 64 bits \\ \hline Overhead & 80 bits \\ \hline Transmission Power & \(\begin{array}{c}-10\text{ dBm (in-body)}\\ -12\text{ dBm (on-body)}\end{array}\) \\ \hline Noise Power & \(\begin{array}{c}-100\text{ dBm}\end{array}\) \\ \hline Data Rate & \(\begin{array}{c}800\text{ kbps (in-body)}\\ 2\text{ Mbps (on-body)}\end{array}\) \\ \hline \(R/B_{N}\) & \(\begin{array}{c}2\text{ bps}/\text{Hz}\end{array}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Simulation parameters. with lesser errors. A similar result is shown in the case of LOS and NLOS links. The links are reliable for longer hop lengths in the case of LOS links compared to NLOS links. The EE for transmission over direct and cooperative links is shown in Figures 4 and 5. The energy values of the transceiver are listed in Table 3[30]. Knowing the energy parameters, the EE is determined as a useful fraction of energy from overall energy consumed. In the case of EE, the optimal policy is of the threshold type. At smaller link distances, we find that EE for the direct link is better than any of the cooperative schemes, but, after a certain threshold level of link length, the cooperative scenarios work better. The EE in the case of two-way relay link is further improved from the one-way relay link as it transmits double the amount of data in a lesser number of transmissions. The communication can be divided into two different regions in terms of EE depending on hop length, the distance where direct communication is better and the distance where better efficiency is obtained through cooperation. A sharp drop in EE values of the direct link is observed when the PER for this link becomes high. The lower EE values of relay links before this threshold value indicate that the losses for relaying are  
Figure 3: PER for on-body communication; (**a**) PER for on-body line of sight (LOS) communication; (**b**) PER for on-body non line of sight (NLOS) communication. Figure 2: Packet error rate (PER) for in-body communication. greater for smaller link lengths, but, as the link length increases, they perform efficiently compared to the direct link. It is observed that, approximately around 17 cm, the direct link deteriorates and cooperative links start performing better for in-body communication. Similarly, the direct link's efficiency decreases above 150 cm and 25 cm for LOS and NLOS on-body communication, respectively. However, still at smaller distances, greater reliability is achieved using cooperation, especially two-way relay cooperation, as we still get better PER than direct links.