# Realistic Simulation for Body Area and Body-To-Body Networks
## 3 Proposed Simulator
### Deterministic (Bio-Mechanical) Radio Link and Mobility Modeling
#### 3.2.1 Intra-/Inter-BANs' Biomechanical Mobility Modeling  
Modeling the mobility and posture behaviors of real human bodies is a complex task. One solution consists of exploiting real-time motion capture data and coupling them with geometrical transformation and analysis techniques to properly investigate the performance of BANs and BBNs under different mobility scenarios (e.g., walking, running, exercising, _etc._).  
In this regard, first of all, a bio-vision hierarchical (BVH) file is utilized, which extracts the skeleton to obtain the markers' locations/positions. The BVH file consists of two parts: the skeleton part and motion data. The skeleton part of BVH describes the hierarchy and initial pose of the skeleton. The motion part contains the rotation and translation of skeleton joints. The root of the BVH skeleton is always zero, whereas all other non-root joints have three Euler angle rotation data of joints. Then, we  
Figure 9: Comparison between measured and implemented belt-to-belt body-to-body (B2B) channel.  
need to calculate the rotation matrix and translation matrix of every joint relative to its parent joint. More details regarding biomechanical modeling can be found in [69; 70].  
The above biomechanical modeling and transformation help to introduce space and time variations into the IEEE 802.15.6 proposed channel models to make them more dynamic and realistic.  
As shown in Figure 10, our proposed intra- and inter-BANs' mobility modeling works based on six main steps:  
Step 1: real motion capture measurements, which contain the actual human mobility traces according to different mobility scenarios (e.g., walking, running, _etc._), are extracted into our MATLAB mobility modeling tool [66].  
Step 2: The complete human body skeleton is captured from the input motion capture measurements, which consist of a set of markers (_i.e._, the joints between the different parts of the body) and segments (_i.e._, the body parts). These markers provide the dynamic distances among all of the locations over time. An example of a human body skeleton is shown in Figure 10.  
Step 3: In order to properly model the human body parts (e.g., arms, torso, head, legs, _etc._), cylinders are applied around the different segments of the human body skeleton. This is an important step to take into account for the body shadowing effects on the performance of radio links; which can either be in the direct LOS or NLOS condition.  
Step 4: Geographical transformations are then applied in order to scale the dimensions into normal human height and width. Moreover, the determined human body is replicated in configurable numbers of other human bodies in order to enable the simulation of complex and highly dynamic inter-BAN scenarios.  
Step 5: Geometrical analysis is thus applied in order to determine the types of all of the available links (e.g., LOS or NLOS, intra- or inter-BANs) and during the whole trace duration. Exact link types during mobility are evaluated by checking the intersection of the cylinders between all of the links. If a link intersects with a cylinder, then the link is declared as NLOS; otherwise, it is in the LOS state.  
Step 6: Finally, space-time-varying links and mobility traces are generated and stored in an external file, which ultimately can be fed into the WSNet packet-oriented simulation environment [58] to enable the realistic performance evaluation of high level communication protocols.  
Figure 10: Joint biomechanical, group mobility and radio link modeling for BANs and BBNs.