# BNS: A Framework for Wireless Body Area Network Realistic Simulations
## 1 Introduction
For implanted nodes, a dramatic increase in temperature heats the tissue around the node and can cause tissue damage and infection. For example, in [8], it is exposed that a temperature increase of 0.1 \({}^{\circ}\)C is sufficient to activate thermoregulatory responses of the human body that can be harmful in the long-term. In WBAN scenarios, two sources of a node's temperature rise are: the transceiver radiation and energy consumption of the node's circuits. Using low transmission power, the radiation absorption is reduced, and avoiding long periods of node operation, the increase in node temperature may be controlled [9]. Specific protocols for WBAN have been proposed to overcome these technical challenges. Whenever a new technological proposal emerges, it is important to carry out performance evaluations in environments in which they will be used. However, it is not always feasible to create the infrastructure for a real test scenario; whether for economic reasons or other human factors. In such cases, evaluating a new solution using simulation is the preferred option. Therefore, it is necessary to have models as close to reality as possible to create realistic simulation environments to evaluate the performance of new WBAN proposals. In the literature, several simulation tools are used to evaluate WBAN proposals, such as OMNET++, Castalia [10; 11; 12], MiXiM [13], NS-2 [14; 15], NS-3 [16] and MatLab [17; 18; 19; 20; 21]. In addition to simulation tools, there are test-bench-based studies such as [22; 23]. Most simulation tools focus on a single network layer evaluation. For example, most MatLab simulations aim at modeling the PHY and MAC layers. However, studies like [20] also use MatLab to evaluate the performance of routing proposals. On the other hand, network simulators such as NS-2 and OMNET++ are often used to evaluate proposals for routing protocols. This dissociation between layers reduces the realistic likelihood of the simulated scenario. Therefore, there is a need for a simulation tool that integrates all network layers and at the same time satisfies the demands of WBAN. Specifically, Castalia [10] is a framework that addresses this need for integration of layers. Castalia became the most widely accepted proposal in studies focusing on WBAN, mainly because it offers an experimental channel model and an implementation of the IEEE 802.15.6 _draft_ version. However, to simulate WBAN in realistic environments, Castalia still needs to incorporate new modules, such as the effect of node transmissions on body temperature, human body mobility models, specific routing protocols, and a healthcare standard for the application layer. The WBAN standard defines an architecture with three levels: Intra-WBAN, Inter-WBAN and Beyond-WBAN [3]. In the application layer, the current version of Castalia only considers configurations for generic Wireless Sensor Network (WSN) devices without considering the particularities of healthcare sensors. Additionally, the data representation and the communication mechanisms between the sensor nodes and the coordinator node for e-health applications, specified in the IEEE-11073 standard, are not considered. To fill in those gaps, this work presents the Body Network Simulator (BNS) framework, an extension of the Castalia framework for intra-WBAN communication, which includes:  
* Wireless Channel Model:The wireless channel model [PERSON] et al. [24], created specifically for WBAN is implemented and available in the BNS framework. * IEEE 802.15.6: The draft version of the MAC protocol provided by Castalia is updated with functionalities and requirements of the IEEE 802.15.6 standard published in 2012. * Mobility Model: A mobility model based on MoBAN [25] is also provided in the BNS framework. The model enables the use of a set of postures and node's movements based on the current posture and node placement. * Temperature Model: A temperature model based on the Pennes bioheat transfer equation [26] is incorporated.