# BNS: A Framework for Wireless Body Area Network Realistic Simulations
## 2 Related Work  
Several simulations tools are used to evaluate WBAN proposals, such as OMNET++, Castalia, MiXiM, NS-2, NS-3 and MatLab. In addition to simulation tools, there are test-bench-based studies [22; 23], and others where authors developed their own simulators [29]. OMNET++ [30] is a discrete-event simulator commonly used to build network simulators. It has an object-oriented modular structure and is developed in C++. Its module-based architecture allows it to be easily used in new network simulator proposals. Among the frameworks for network simulation developed on top of OMNET++ are MiXiM [13] and Castalia [10]. MiXiM is an OMNET++ modeling framework created for mobile and fixed wireless networks as WSN, WBAN, and others. It offers detailed models of radio wave propagation, interference estimation, radio transceiver power consumption and wireless MAC protocols. However, the implementation of the WBAN standard is not available. Castalia framework [31] is more specific for simulating WBAN protocols. It was developed for low-power device networks. Specifically, to simulate WBAN, Castalia offers an advanced channel model based on empirically measured data for the human body as the propagation medium as well as a radio model based on real radios for low-power communication. Additionally, the radio model is highly flexible. It estimates the reception probability based on Signal-to-Interference-plus-Noise Ratio (SINR), packet size and modulation type. It allows several levels of transmission power, being able to identify variations for individual nodes. Castalia performs a realistic modeling of the Received Signal Strength Indicator (RSSI) and carrier detection, it defines states with different energy consumption and delays in switching between states and considers the node's clock deviation [10]. Moreover, Castalia has an implementation of the IEEE 802.15.6 _draft_ version. Because of that, Castalia became the most widely accepted proposal in studies focusing on WBAN [12; 32; 33; 34; 35; 36; 37]. For example, in [37] Castalia is used to evaluate the performance of the PHY, MAC and Network layers of WBAN. In [36] a comparative analysis of the IEEE 802.15.4 [38] and IEEE 802.15.6 standards over a WBAN healthcare monitoring system is performed using Castalia, to evaluate QoS parameters of the two standards under the same conditions. However, Castalia does not provide necessary modules for realistic simulations, such as: body temperature model, WBAN specific routing protocols, and a Healthcare Application Layer. NS-2 is an open source, discrete-event network simulator. It was built in C++ and is capable of simulating wired as well as wireless networks. Some researchers, focusing on routing algorithms for WBAN, have used NS-2 to simulate and evaluate their proposals. In [15] a stable, reliable and energy efficient routing protocol for WBAN is proposed. In that work, the authors evaluated two performance metrics, energy consumption and routing overhead. Their proposal was implemented and evaluated using NS-2. In [14] the authors propose DMQoS protocol. In this work, the performance of the DMQoS is compared with DARA [39] and LOCALMOR [40] protocols, other routing protocols developed in NS-2. In those studies, simulations were focused on evaluating the performance of the proposed protocol and the IEEE 802.15.4 standard was used in the MAC layer. In the literature, no work has been identified with the implementation in NS-2 of the IEEE 802.15.6 standard MAC layer. The NS-3 project [41] was initiated in 2006. Like NS-2, is an open source, discrete-event network simulator. This simulator is considered to be a replacement of NS-2 and not an extension. It is written in C++ language and python. Some studies have implemented models to simulate realistic WBAN scenarios using NS-3. For example, in [42; 43], implementations of the IEEE 802.15.6 standard are proposed for NS-3.