# Towards Efficient Wireless Body Area Network Using Two-Way Relay Cooperation
## 4 Simulation, Performance Evaluation and Optimal Packet Size
### Optimal Packet Size  
WBAN sensors differ in data rate, frequency and payload size depending on the application [31]. The packet size along with other parameters greatly affects the energy efficiency of the system. The consequences of variable packet sizes are elaborated in this subsection. The optimal packet size can be found by partially differentiating the EE for the given link over packet size. The mathematical expressions obtained could not be shown in closed form easily. Based on the calculations of EE, a suitable packet size for specific link length could be determined by simulations. EE is analyzed for various hop-lengths and multiple packet sizes, with the maximum being 2000 bits as specified by the standard [1], in order to scrutinize the maximum achievable value of efficient energy. The simulation results for different schemes are shown in Figures 6 and 7. A general trend is observed in which greater link lengths reduce the optimal packet size. \begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**Communication Link**} & \multirow{2}{*}{**Relay Placement**} & \multicolumn{3}{c}{**Percentage Decrement**} \\ \cline{3-5}  & & **In-Body** & **On-Body LOS** & **On-Body NLOS** \\ \hline \multirow{4}{*}{One-way Relay} & d/4 & 32.5\% & 28.5\% & 32.1\% \\  & d/3 & 22.5\% & 20.0\% & 23.2\% \\  & 2d/3 & 22.5\% & 20.0\% & 21.4\% \\  & 3d/4 & 30.0\% & 28.5\% & 30.4\% \\ \hline \multirow{4}{*}{Two-way Relay} & d/4 & 35.0\% & 34.3\% & 33.9\% \\  & d/3 & 25.0\% & 25.7\% & 25.0\% \\ \cline{1-1}  & 2d/3 & 22.5\% & 20.0\% & 21.4\% \\ \cline{1-1}  & 3d/4 & 30.0\% & 28.5\% & 30.4\% \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Relay placement. \begin{table}
\begin{tabular}{c c c c} \hline \hline \multirow{2}{*}{**Data Ratio (S-D)**} & \multicolumn{3}{c}{**Percentage Decrement**} \\ \cline{2-4}  & **In-Body** & **On-Body LOS** & **On-Body NLOS** \\ \hline
1:0.8 & 9.91\% & 10.09\% & 10.09\% \\
1:0.75 & 12.48\% & 12.48\% & 12.48\% \\
1:0.5 & 24.95\% & 24.95\% & 24.95\% \\
1:0.25 & 37.43\% & 37.43\% & 37.43\% \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Unequal data over relay links. In the case of in-body communication, the EE of the direct link remains almost the same for distances less than 17 cm and also greater from cooperative links. At 17 cm, the maximum EE is obtained by transmitting packets with sizes between 500-1000 bits over the direct link. After this distance, a direct link starts to deteriorate in terms of EE and two-way relay link starts performing better. At almost 23 cm, the direct link deteriorates completely. The cooperative links perform well over a range of packet sizes till 32 cm hop length. Afterward, two-way relay performance decreases for larger packets. At approximately 34 cm, the optimal packet size reduces to 500 bits. A further increase of hop length from 35-40 cm results in a decrease of packet size transmitted with greater EE. Considering on-body LOS communication, the direct link transmits efficiently for hop length of 135 cm with optimal packet size of 1500 bits. The link remains efficient over a packet size of 1000-2000 bits. The cooperative links remain efficient over a range of packet sizes from 160-270 cm. The optimal packet size at 270 cm is 800 bits over a two-way relay link. After this, the two-way relay link deteriorates for larger packets. The one-way relay link performs better for larger packets. Figure 6: Energy efficiency vs. packet size (in-body communication). Figure 7: Energy efficiency vs. packet size (on-body communication). (**a**) energy efficiency vs. packet size (on-body LOS communication); (**b**) energy efficiency vs. packet size (on-body NLOS communication). In the case of on-body NLOS communication, the direct communication remains energy efficient for any packet size when source-destination hop length remains less than 20 cm. At 25 cm, we get optimal packet size of 1000 bits approximately on the direct link. Afterwards, cooperative links start to perform better and EE degrades on the direct link even for smaller packets.