# Realistic Simulation for Body Area and Body-To-Body Networks
## 4 Performance Evaluation
### Simulation Setup and Scenario  
A packet-oriented network simulator, WSNet [58], is used (as shown in Figure 1) to evaluate the BAN and BBN application scenarios. WSNet contains various models for wireless sensor networks, wireless local area networks and _ad hoc_ networks. However, previously, it did not contain BAN-specific modules. Therefore, we have enhanced the simulator (with the focus on IEEE 802.15.6 standard compliance) to accurately model body area networks using enhanced channel models, an accurate radio link and mobility models (as explained earlier in Sections 3.2 and 3.1).  
In order to replicate the following simulation results, Table 8 presents the details of each model being used along with the configuration parameters and their values. It is important to mention that, for the deterministic approach, any specific scenario depends on the mobility patterns and the corresponding trace files. These trace files are imported in the simulator [18]. We can use diverse external mobility traces (including, swimming, running, walking, sitting, standing, _etc._). However, to compare the results with the semi-deterministic approach, we limit ourselves to only walking.  
However, we have three nodes, located at the belt (the coordinator Node 0), ear (Node 1) and right wrist (Node 2), and mainly, we compare the results for these three locations. It is important to mention that for the deterministic approach, we improve the accuracy of the IEEE 802.15.6 standard channel model by introducing dynamic distances, space and time variations and link types (line of sight, non-line of sight and time-varying periodic links); for example, for NLOS, we add 13% additional path loss according to [75]. To highlight this accuracy, we have presented a few time-varying links (such as ankle, knee and toe), and their correlation behavior is illustrated in Table 7. Finally, if the links are stable (_i.e._, LOS with fixed distances), then the deterministic approach is the same as the IEEE 802.15.6 standard.  
The simulation settings are as follows: at the application layer, two sensor nodes located at the ear and right wrist and one coordinating node (located at the belt) are considered. Every node generates a packet at 100-ms intervals of a size of 256 bytes of payload. From the application layer, every packet is parsed into the MAC layer where the carrier sense multiple access (CSMA/CA) protocol with priorities using a state machine is implemented. The priority level of the data is set to two. The backoff mechanism is followed exactly as proposed in the IEEE 802.15.6 standard (_i.e.,_ for every odd backoff, the contention window size is doubled), where maximum backoff and re-transmissions are set as five and four, respectively. Further, the immediate acknowledgment policy is adopted. The overhead of the MAC and physical layers has also been considered according to the IEEE 802.15.6 and the chosen physical layer. In this paper, we will focus on differential quadrature phase shift keying (DQPSK) modulation with the highest data rate (_i.e.,_ 971.4 kbps). However, more detailed results on varying parameters can be found in [62].  
The simulation setup is based on Version 3.0, which is an up-to-date version of the WSNet simulator. By using all of the above-explained models and parameters in Table 8, WSNet's XML configuration files are generated for the simulations. The simulations are run for 100,000 packets transmission, and the 95% confidence interval is considered.