# BNS: A Framework for Wireless Body Area Network Realistic Simulations
## 2 Related Work
Additionally, in [16] a comprehensive review of the main components of the IEEE 802.15.6 standard is conducted and modeling strategies are presented to implement IEEE 802.15.6 MAC in the NS-3 simulator. In that work, the authors also modeled the necessary components in NS-3 to provide a realistic simulation environment and to reliably evaluate health monitoring systems. Among these components, we find models for PHY, MAC, error rate, propagation loss, on-body channel, energy, and human mobility. However, a temperature model that allows monitoring the heating of the WBAN sensor nodes and an application layer that implements the communication protocols between personal health devices in correspondence with the ISO/IEEE 11073 standard are not provided for NS-3. Additionally, there is no freely available WBAN mobility model for simulating WBAN in any of those simulation tools [25]. MatLab is a powerful simulation tool, and is also used in several studies focused on WBAN [17; 18; 19; 20; 21]. However, it does not allow simulations to be performed considering all network layers. Matlab is most used in studies focused on modeling the PHY and MAC layers. However, proposals like [17; 20] also use MatLab to evaluate the performance of routing protocols. In [17] a thermal-aware routing protocol that avoids high temperature areas (hot spots) is proposed. In their work, a temperature model is implemented; however, in the study only the performance of the proposed routing protocol is evaluated without considering other layers. It is important to note that MatLab is not a network simulator itself. It allows implementation, simulation and evaluation of the behavior of models. However, for network simulation there are better tools such as OMNET++. In other studies, prototypes of WBAN nodes are used to evaluate communication protocols and the wireless channel. For example, in [22] they explore on-body packet routing issues in the presence of topological partitioning caused due to ultra-short wireless range and postural body movements. In that work, a probabilistic packet routing protocol is then developed using a stochastic link cost, reflecting the body postural trends. The performance of the proposed protocol is evaluated experimentally. For that, authors developed a prototype of WBAN. In [23] the behavior of the wireless channel is estimated in correspondence with a real scenario. As a main result of that work, a loss map and a temporal variation model of the wireless channel are proposed, which were generated based on real measurements. For that, experiments were carried out using transmitting and receiving antennas on the body of people, simulating the transceivers of the WBAN nodes. In those work, WBAN prototypes do not consider a protocol architecture with all layers of a WBAN network. However, implementing a WBAN for testing can prove costly and in addition, testing real-world scenarios that consider nodes implanted in the body remains a challenge. In [29], a thermal-aware routing protocol is proposed. The objective of that work is to reduce overheating of sensors implanted in human bodies. The authors evaluated the temperature increase and the energetic efficiency. For that, the authors developed a specific simulation program in Java using discrete-event simulation. However, the simulator does not comply with the definitions of the WBAN standard. In the literature review, the need for simulation tools that provide an application layer with communication protocols for real personal health devices was identified. In addition, the different simulation tools have some dissociation between the different layers of the proposed network architecture for WBAN, which reduces the likelihood of simulating a real scenario and makes comparison difficult. To overcome these issues, this work presents the BNS framework as an extension of Castalia. Details of the implementation modules are presented in Section 3.