Performance and Scalability Evaluation of the Wireless Body Area Network using Castalia Simulator

Castalia is a model for WLAN (WSN), body areas (BAN), and low-power networks, which are commonly frequently used in research and technology, for networking devices. This paper, provides a simple assessment of Castalia’s memory use and computing time over a number of scenarios and characteristics of Wireless Body Area Networks (WBANs). While, WBAN gives you the ability to monitor patients closely, but it presents many new challenges too. HKernel parameters like network size, simulation time, and mobile node fraction are, however, unique to demonstrate the scalability potential of Castalia. We analyze our results and clarify the success of the simulator against intuitive results. Also examined in traffic adaptive approaches are IEEE 802.15.4 standard called Zigbee and IEEE 802.15.6 standard called baseline MAC. In fact, the procedures are also compared, the distribution ratio (PDR) are compared and the energy demand is evaluated. They are evaluated. Castalia users should use the tests and their interpretations as a guide to assess the drawback of their simulations, as well as to select criteria that balance performance consistency. We also demonstrate future users the efficiency capabilities of Castalia-3.2

standards of data speeds, customer loyalty (QoS), and consistency for WBANs. In ability to engage with this situation, the first MAC / PHY IEEE 802/15.6 was created in 2012 [12]. This draught describes the IEEE 802.15.6 separation into different channels Fig. 1. WBAN System Representation [4] as well as other beacons of the Superframe framework. In order to encourage healthcare IEEE802.15.6 [11] and multimedia technologies, the Task Force has produced a restricted selection for low-powered devices (WTP) in the human body. IEEE 802.15.6 [13] addressed frame setup, frequency modulation and protection encoding for MAC and PHY layers. It offers up to 10Mbps of information and [14] of incredibly low capacity. The back-off counter (BC) and the containment window (CW) protocol are often used for new responsibilities. [15]. However, IEEE802.15.6 MAC's superframe structure has main limitations, regardless of its urgency or non-emergency data, contention-based channel distribution to bio-methodical sensor nodes [16]. While there is no differentiation through low or high emergency data threshold values and no distribution of life-critical appropriate data slots. [17]. In emergencies, access to the channel consume more energy for the longest possible time, according to existing literature. In comparison, intermediate nodes can be found in important sensor nodes and not all those network nodes.
The WBAN has become a big topic of investigation. In WBANs, many network information is not finalized and uni-form. It is very expensive to build a WBAN testbed. It is costly and difficult to conduct actual experiments on a test bed .Furthermore, repeat ability is largely affected as many factors simultaneously affect the experimental findings. One aspect is difficult to isolate. In addition, real experiments always take time. Simulation of WBANs is therefore important for the development of WBANs. In a large scale, protocols, schemes and even fresh ideas can be examined. By setting parameters for WBAN simulators, users can isolate different factors. Simulation, as a common way of testing new applications and protocols in the field, is thus essential for studying WBANs. It also led to the recent boom in the development of simulators.

Simulation Emulation Tools
Simulator shall be used universally, particularly in the early stage of these designs, to design and implement Wireless Networks. There is a very small charge to simulate thousands of nodes and the In a very short period of time, simulation can be performed. For the modelling of wireless networks, particular and special simulators are accessible [18]. The tool for simulation is called the emulator, which uses both software and equipment. All software and hardware can be implemented by emulation. The emulator runs in real nodes so the productivity can be higher. The emulator is generally very scalable, so several sensor nodes can be simultaneously emulated [18].
The whole section shows seven existing technologies for simulation in a variety of wireless networks, including WSN, WBAN and others. These are NS-2, TOSSIM, OMNeT++, J-Sim, ATE´ MU, and Avrora [18].

A. NS-2
When using NS-2 to simulate WBANs, it contains both advantages and limitations. Initially, NS-2 will cover a wide range of procedures in each layer as a non-specific simulation environment. For instance, ad-hoc and WSN protocols are given by NS-2. The open model improves on testing costs, and the users' ability to change and expand software easily with online papers. But there are certain drawbacks to this simu-lator. Use NS-2 for modeling the WBAN is more complicated and timely than other simulators. NS-2 offers poor graphic support without GUI, so the user has to face text commands on mobile devices directly. NS-2 provides low graphic service [19]. Therefore, the use of NS-2 is unacceptable and hardly correct results can be obtained.NS-2 is a simple network emulator that does not allow any special WBAN functions into consideration.
B. TOSSIM TOSSIM is a powerful, but very simple WSN emulator. TOSSIM also has a Tiny Viz graphical user interaction system that provides the user with images rather than text com-mands. Each node can be assessed and the emulator can capture hidden terminal problems under perfect transmission conditions. TOSSIM can support thousands of simulations as a special network emulator. This is an excellent feature since it can simulate the situation in the real world more accurately. TOSSIM can imitate models of radio and execution of code. However, there are still some limits to this emulator. It supposed to imitate the behaviour and use of TinyOS, and does not replicate workout measurements of recent models. TOSSIM cannot simulate energy consumption issues in WSN and WBAN correctly in this context. Each node must run on NesC code, an event-drived component-based programming language, which is deployed on TinyOS [20]. Therefore, TOSSIM can emulate only homogeneous applications of its kind.As TOSSIM is created especially for WSN simulation, motes-like nodes can only be simulated by TOSSIM. In brief, the advantages and disadvantages of TOSSIM as an emulator of WSN.
C. OMNET++ OMNeT++ is an C++-built network event simula-tor. Applications can manage OMNeT++ emulator on Debian, Unix like framework and windows. OMNeT++ is a famous network simulator that is non-specific and can be used in wired and wireless implementations. OMNeT++ is open source, most of its frameworks and simulation models are freely available.OMNeT++ offers a strong graphics interface. This powerful GUI makes it much easier to trace and debug than using other simulators. Mobility Framework is provided by recent versions of OMNeT++. This simulator supports both MAC protocols and located WSN and WBAN proto-cols. OMNeT++ can be used for simulating sensor networks. OMNeT++ can simulate problems with power consumption [21]. On OMNeT++ simulator, however, there are still certain limitations. For instance, the number of protocols available are not sufficient. To overcome these limitations various simulators like INET, Castalia, MiXim are some popular frameworks run on OMNET++.

D. EmStar
EmStar is a real-time trace driven emulator. EmStar has been developed at the University of California of Los Angeles and has been published in C. When individuals use EmStar to simulate WSNs, it contains both advantages and limita-tions. First, the modular EmStar programming model enables users to compile every module independently without sacri-ficing software re-usability. It does indeed have a robustness function that mitigates sensor faults, and provides many modes to facilitate debugging and evaluation. EmStar provides an adaptable environment that helps users to freely move between simulation configuration and sensor. Each service can also be easily interconnected with a standard interface. EmStar does have a GUI for electronic gadgets that is very useful to users. If you use EmStar, the same code is written on each execution platform that reduces error when iterating the individual modes [22]. EmStar also provides a wide range of online documents for the use of the emulator. But there are a few drawbacks to this emulator. For instance, a huge proportion of simulation sensors cannot be supported, and minimal scalability limits the complexities of the simulation. EmStar will only operate in real-time simulation only.
E. J-Sim J-Sim is a secure network event emulator based on Java. It offers the GUI-based library, which helps users for computer modelling to develop and construct a "text-based code." J-Sim comprises many protocols and, by means of detailed models of the J-Sim protocols, can endorse also data broadcasting, routing and localization simulations in WSNs. System use and radio channels can be simulated in J-Sim sensing networks. J-Sim includes an Interface library for managing and modifying user programmers. The self-sufficient platform makes choosing certain components simple for users to fix each issue. J-Sim is able to simulate more sensor nodes than NS-2, about 500 and J-Sim is capable of maintaining many recollection sizes. But this simulator has some drawbacks. The NS-2 is much easier to incorporate [23] Since J-Sim was not planned to mimic WSNs first, it is not feasible to incorporate new protocols or node components in the J-Sim architecture. This is not practical initially.
F. ATEMU ATEMU is an emulator of WSN-built AVR; AVR is a microcontroller board of the MICA-platform microcontroller utilised. ATEMU does provide Xatdb GUI for both the imple-mentation of sensor nodes, debug instructions, and monitoring of software performance. ATEMU is a special WSN emulator that promotes users using MICA2 hardware to run TinyOS. Not just communication between the sensors can be emulated by ATEMU but also every instruction in each sensor.ATEMU can simulate several sensor nodes simultaneously and specific programs can be run by each sensor node. ATEMU has a wide range of hard devices library. At ATEMU, detail emulation in WSNs can be very high. Users can use a GUI to help debug and monitor executions of program. Simulation costs are reduced by the open source. An appropriate prediction can be provided by ATEMU to allow users to compare and achieve accurate outcomes without stereotyping [24]. Whilst ATEMU can generate high precision outcomes, time of simulation, for example, is considerably more than that of other simulation applications. ATEMU also has less problem modelling functions for routing and grouping. Consequently, ATEMU comprises both benefits and drawbacks.

G. Avrora
Avrora is a simulator specially built for WSNs developed from Java. Avrora is able to simulate MICA2 sensor nodes based on AVR, similar to ATEMU. Avrora offers a broad range of tools to simulate WSNs.This simulator integrates and limits the merits of TOSSIM and ATEMU. No GUI is sup-plied by Avrora. Avrora also encourages simulation of energy consumption. This simulator offers online documents and open sources. This simulator, however, has some disadvantages. The Avrora codes are instructed to run, providing agility and scalability increased. It supports hundreds of simulation nodes and can save even more time with equivalent performance. Avrora achieves better precision than TOSSIM with the same sizes of the sensor unit, providing the same sensitivity as ATEMU [25]. It is constructed in Java, which, according to the TOSSIM and ATEMU, offers tremendous versatility. The different programming projects Avrora is capable of simulating, but only TOSSIM can support simulation with TinyOS.
As mentioned in the section, there are several simulators used in the WSN and its applications such as WBAN research. The most common ones are the TOSSIM [20] network simu-lator and its particular WSN updates, the JavaSim (previously known as JavaSim) [23] and the JavaSim [2] simulator, an emulation node that executes the TinyOS operating system. It is the JavaTM-basic simulator which was generated in the after-ns-2 mode to resolve the scalability problems facing NS-2. When it comes to functionality and model accuracy, Castalia is out of scope to compare these and other WBAN Simulators. Designers may carry out a full set of simulations with only Castalia 's attention, varying from various scenarios and prototypes to different scaling parameters.

Summary of Castalia's Models
This section provides us with a concise description of the models that contribute to the simulation findings discussed in this article. See the Castalia User Manual for a more detailed description [26]. Castalia was built on OMNeT++, a framework for the computer network simulation which provides essential machinery and tools for the writing of discrete-event simulators. Castalia is a system of wireless networks of sensors (WSNs), the body areas and, in particular, the systems of low-power embedded devices. It can also be used, since it is extremely parametric, to test different platform features for particular systems and can also model a variety of platforms. OMNeT++, a fantastic platform for setting up event-driven simulators, enables Castalia partly to be scalable, stable and efficient. Castalia's core characteristics are: • Channel Modeling • Radio Modeling • Extending Sensing Modeling • Design of new MAC and routing protocols Such standardized and consistent structure for validating a specification first-order before it is introduced. By predicting temporal shifts and cumulative route losses dependent on the human body variants, Castalia is by far the most accurate BAN network simulator. Various sensor nodes or nodes are not directly connected to each other as shown in fig. 2. The arrow indicates the communication from node to device. The Wire-less Channel(WC) determines who can accept the information packet whether node does have the data to transmit. So there are number of Physical Processes(PP) known as sensor device or simply called node. It represents multiple sensing devices. Castalia supports the creation of own systems and applications by identifying suitable abstract groups as depicted in fig.3. The user can modify the application module easily. Castalia's framework is also expressed in the directory hierarchy within the source code. Every module matches to a directory where .ned file that describes the basic model, input/output gates and parameters of module is always present. There is configuration file called .ini file that applies or resends the variables to a value other than their default value. Modules and messages are the basic concepts of Castalia. The basic execution unit is a simple module. It reads or executes a set of software according to the communication from other devices. The code will indicate that the interactions are changed and can send (or schedule) new messages.

A. Channel Modeling
The mean path loss among two nodes, or 2 sides in storage in particular, is an essential part of wireless channel modelling. Castalia uses the lognormal model shadowing, as well as the radios which returns the transmitted power probability of packet reception (PRP).A functional model avoids medium path loss, but the canal has another dimension: time variance. and for Body Area Networks, it is particularly important when test data suggests that the signal obtained variates widely over time. Castalia's solution is simple, consistent, but efficient. The lognormal shadow model doesn't show good results in terms to BAN modelling. In this case we will use a different option that we can use from Castalia, explicitly setting our road loss map.In order to provide feedback to Castalia, for example, calculated average path losses using a trial bed (as in NICTA). It is achieved by the parameter SN.wirelessChannel.pathLossMapFile which provides the file name of the input file, which is specially formatted. The radio channel transmits the signal primarily to the radio and allows it to decide how much interferes, its SINR (interference signal plus noise ratio) (changing dynamically) interference, but not that it accepts a message. The radio signal transmission information such as modulations, wavelength, frequency of the sender, and particularly signal strength in dBm shall only be transmitted via the radio wireless channel. The wireless channel calculates the strength of the signal sent to a node on the basis of the failure of the route (average path loss + time change) and the transmission power.
Envision the reception of two messages, one being the highest sensitivity, some other 1dB lower.Unless the shortest signal was not received, the first would be analysed and the packet it had delivered would be retrieved without any problems. There will probably be a crash if we relay both signals. How far less are we going to move than the radio response? For BAN phone, -100dBm is a decent deal.

Wireless Modeling
In general where mobile nodes, an evolving structure is taken into account, including of BAN, the wireless channel is a very difficult design. Another critical catalyst has emerged from the latest development in BAN and the next IEEE BAN standard. Extensive experimental beds, for example, produce tens of millions of NITCA samples. These calculations are described to provide reliable predictions for the normal loss of body direction as well as for the temporal behavior of the stream in particular. With respect to wireless interface, Castalia is the most versatile WSN and BAN simulator. The term straight is being used here in the sense that perhaps the simulator guarantees that the various essential functions of the wireless channel can be identified. To provide tests that adequately represent truth, correct input parameters and data files will be needed.

A. Average path loss modeling
The estimation of the average distance loss between the two nodes, or usually two points in space was a core aspect of wireless channel modelling. The lognormal shadowing model was shown to provide reliable forecasts of the average loss of paths of WSN with node spacing of between a few metres and 100 metres. However the lognormal shadowing model in BAN simulation doesn't really deliver a good result. Therefore, our path loss map in Castalia is specifically given. At NITCA, the average trajectory losses were estimated using the test bed and as Castalia data. This is achieved using the SN.wirelessChannel. pathLossMapFile parameter, which provides the filename of the specially formatted input file. The input file is formatted with the following lines: TxNodeID>RxNodeID1:dBvalue1,RxNodeID2:dBvalue2,. . . example: 0>1:56,2:40,3:59,4:54,5:58 In this example 0,1,2,3,4 and 56,40,59,54,58 are nodes and path losses in dBm respectively. So when Node 0 is sent, Node 1 has a loss of 56dB path, Node 2 has a loss of 40dB, Node 3 has a loss of 59dBm, etc.

B. Allowing for node mobility
The fact that the average loss of path between both the nodes now is not enough makes the mobility of mobile nodes exacerbate Space is divided first into separate cells and losses are measured from one cell to another in order to maintain the path losses between space points. See Figure 4 for an example with only another cell transferring such a path loss map. The map is computed by the model and input files previously defined, and we are only taking the cell and cell identifiers instead of real node checkpoints and node identifiers. The parameters below are set the cell size (default = 5m). SN.wirelessChannel.xCellSize SN.wirelessChannel.yCellSize SN.wirelessChannel.zCellSize The smaller the cell size, the more fine-grained and precise path loss map becomes, however it requires more memory to store it. With a few bytes per path loss feature, this can mean Giga Bytes of memory. The software is clever and doesn't Fig. 4. Path loss map in a 2D space segmented in cells (for a single transmitter cell) carry all the potential combinations, but you get a sense of how soon the state-space will burst and even the calculation time to search for such cells. Wireless channel trace messages include details on the size of the route failure map and the time it will take to update it. Its expertise will assist in determining if memory and computational efficiency are the field size preference. The mobility parameter in the wireless channel is set to SN.wirelessChannel.onlyStaticNodes='True' when do not have mobility of node. The nodes are used as individual cells in which their location is accessed, but the remainder of the code remains similar. It saves a lot of machine memory and processing power.

C. Temporal variation modeling
This is particularly obvious in quickly shifting conditions such as those faced in the Prohibition. As shown in Fig.5 it is noted that the channel decreases dramatically (as calculated by-50dB in our BAN experiments), always under regular path loss (0dB) but that 2/3 time is detected in the channel faded by the Weibull channel. There seems to be a large number of statistical models which describe temporal variations getting their titles from similar scenario datasets. NITCA noticed that no paradigm tackles temporal variability entirely through research across the human body.
• Take note of the average state path loss stored throughout channel setup. • Notice the path loss factor because of time shifts.

D. Signal transmission to the Radio Module
The wireless channel sends out a signal and helps the radio to measure its (dynamically changing) interference SINR and determine whether a packet has been received or not. The wireless channel now only must send radio messages that give signals such as: modulation, bandwidth, carrier frequency and above all signal strength in dBm. The wireless channel will measure the signal intensity at a node based on the  Fig. 8. Non-Beacon mode without superframe Structure trajectory loss (average trajectory loss + temporary variation) and transmitting power of a transmitter. For both the BAN and CC2420 radios we have set, -100dBm is a reasonable value.The radio module aims to record several features of a truly low power radio, which is often found on WLAN sensors. Our radio module has the following characteristics: • Multiple operating modes that can dynamically alter (defined by modulation, data, bandwidth, floor noise and other components).
• Measurement of fine grain interference and measurement of exact bit errors in packets (dynamically modified during receipt) •

RSSI (Received Signal Power Indicator) continuous mea-surement E. MAC
The MAC is the most effective framework for packet distribution and energy efficiency. There are therefore a separate module defining the MAC Protocol, an important part of node behaviour. The process of BMSNs at the previous MAC layer. For several factors, mentioned WBAN topologies are a challenge. First, because of the existence of the data rate vector, the BMSNs are confronted with the problems due to low energies and processing power [28]. Of reference, heartbeat, body temperature, and blood pressure are typically found in BMSNs. However, traffic loads sometimes increase due to emergencies. The BMSNs still provide high-rate traffic for detecting ECG signals in real-time. Second, low-load traffic applications typically need the lowest time energy consumption and high-load traffic applications generally need a high packet distribution ratio with minimal delay [28]. Of this purpose, energy efficiency mainly be taken into consideration in the event of low traffic demand, while the energy-to-packet ratio of heavy traffic should be equalized. Third, internal and external interference and insufficient channel capacity impede the execution of MAC operations through an erratic and immoderate load. For WBANs to achieve high energy consumption and the packet distribution ratio at least at the minimum delay, a dynamic and scaled MAC protocol is therefore essential [3].In this paper, implemented in Castalia four main MAC modules: 1) TunableMAC, a duty-cycled MAC That also exposes a lot of parameters to a user and the modulation implementation. The behaviour and attitude of a simple CSMA / CA MAC protocol also comes from TunableMAC. However, this protocol was designed in order to ensure broadcast contact (i.e., no unicasting). Accounts, control packages for RTS and CTS are therefore not permitted. TunableMAC uses a CSMA communication system, which is a MAC based on a disagreement. This can be tailored for its consistency and its support. Another essential task is to operate the radio and send a suitable train of lightning systems to the reception of potential receivers before through data transmission. It offers several additional features, including retransmission, probabilistic transmission and random TX offsets.
2) TMAC MAC is an enhancement of S-MAC allowing extendible active times). For WSN, T-MAC is a common MAC, utilizing several techniques to maintain low energy consumption (utilizing vigorous duty cycling and synchronization) while attempting to maintain high performance (for example, packet delivery) with the duty cycle changed in line with the traffic requirements. Characterize the sizes of TMAC (SYNC, ACK, RTS, CTS) control packets and maximum datasize and overhead frame sizes. This also shows the MAC buffer capacity.
3  (BAN).The first 4 variables listed are default MAC parameters that signify buffer capacity, packet size, and mac frame overhead. The MAC has to learn and set its own parameters, and has 12 similar BANMAC basic parameters and 5 more parameters that are based on the PHY layer.

Performance Analysis
Formulate a TMAC, BaselineMAC and ZigbeeMAC ana-lytical prototype in this segment. Define the device model first, and then visually show the average energy and packets obtained during experiments each node. In [29], Discuss existing MAC guidelines based on specifications for WBAN architecture. The authors evaluate the performance of the WBAN MAC and TMAC standards of the current IEEE in different terms and conclude that a deadline for these protocols is the worst case. For several other tests, MAC protocols for WBAN are energyefficient. Also examined in traffic adaptive approaches are ZigbeeMAC and baselineMAC. Indeed, the guidelines, the transmission ratio (PDR) and the energy usage are contrasted and postponed. It is measured.

A. System Model
WBAN's simulations are built with 6 sensor nodes in Table-1 as the star topology of the system. Table 2 specifies the specifications of the simulation. The system includes electrocardiogram sensor (ECG), glucose-track sensors, blood pressure-track sensors, drug delivery sensors, and a hub or body coordinator. Distinct sensor nodes relay body information through various communication schemes. Normal data on the patient's psyche is detected by the EKG sensor, the glucose track sensor and the blood pressure track sensor. As supervisor, the Node 0 is used. In this article, WBAN simulates the transmission power and the transmission of the tested body  9. TunableMAC: Packets Received at Application Level sensor connections into one node or in all nodes using the omnet++ Castalia 3.2 simulator to assess the output of body sensor nodes in BaselineMAC operations.

Simulation Results Discussion
During simulation four framework as MAC protocols are considered as follows 1) TunableMAC Framework 2) TMAC Framework

3) ZibBeeMAC Framework 4)
BaselineMAC Framework Run a simulation testing how Zigbee,TMAC and Base-lineMAC performs when its Guaranteed Time Slot (GTS) on and off. The packet rate of the transmission nodes varies in both of these cases. The GTSon (Guanteed Time slot) is a TDMA approach where fixed time slots are allocated to each node to communicate with hub or coordinator node.whereas GTSoff is a There is not any fixed or dedicated link for the nodes. In the Fig. 9 packets obtained from all of the other ZigBeeMAC fraemwork nodes per node, i.e. the packets obtained by nod 0. The result shows that the GTS operates well when it is on the protocol. One can conclude that dedicated time slots is efficient than contention based system. According to the performance, packets received on the node 0 radio layer (hub) shown in figure  9,10,11,12 the TMAC frameowrk performs well ast the maximum number of packets received with no interference. On the other side the tunableMAC lost more packets due to interference.
Notice as shown in figures 13,14,15 16 the latency of packets delivery in TunableMAC is high as compared to ZigBEEMAC, BaselineMAC and TMAC at application level. In order to identify the appropriate protocol to meet WBANs' needs and scope we have also reviewed the existing MAC protocols, namely IEEE 802. 15

Conclusion
Heterogeneous and dynamic traffic loads are used for WBAN applications. The monitoring of regular patients is called low traffic, but heavy traffic is siderite in disturb-ing cases. The paper discusses in general WBAN's traffic adaptive MAC protocols. In the form of the traffic efficient approach, the latest IEEE standards for WBANs are addressed. Moreover, WBAN's problems illustrate the traffic adaptive MAC protocols. This also classifies the current functional solu-tions to traffic. Over ZigbeeMAC and BaselineMAC protocols. Comparative analysis is often provided and the strengths and disadvantages of the MAC adaptive protocols are seen over ZigbeeMAC and BaselineMAC protocols. This paper provides a Castalia efficiency evaluation with respect to estimating time and energy for various simulation scenarios. We particularly See how the output measures of Castalia are calculated where different parameters change and where different models are used. The findings of this work will be a reference for users of Castalia to change their calculations and also to predict their budget for measurement time.