# A Lifetime Maximization Relay Selection Scheme in Wireless Body Area Networks
## 6 Performance Evaluation
### Implementation Discussion  
In addition to the performance evaluation of our proposed relay selection scheme through simulations, in this part, we make a brief introduction to how to implement our relay selection scheme in a real WBAN system so as to validate the feasibility of the proposed scheme.  
We firstly list the parameters needed to execute our relay selection scheme and describe the methods to obtain the values of these parameters:  
* \(d_{i,j}\): the distance between each pair of sensor nodes and the distance between sensor nodes and the coordinator;
* \(n\) : the transmission path state (LOS/NLOS) between each pair of nodes including the coordinator;
* \(E_{TXelec},E_{RXelec},E_{amp}\) : the energy consumption parameters;
* \(k\) : the packet length in the network;
* \(E_{i}\) : the energy storage condition of each sensor node in the network.  
As the total number of sensor nodes in a WBAN is not large, \(d_{i,j}\) can be measured manually after the sensor nodes have been deployed as well as \(n\), e.g., the transmission path state of each pair of nodes according to the location of each node. Furthermore, the energy consumption parameters are obtained depending on the transceiver types of sensor nodes in the networks. \(k\) is specified by the communication protocol and is easily known by WBAN users. \(E_{i}\) can be known by two means depending on two conditions: (A) if the relay selection is invoked at the network initialization where each sensor node is full of energy, we can directly obtain the energy storage information from the sensor node type and battery information; (B) if the relay selection is invoked at a restart from a network recovery, the coordinator can set a request flag in the beacon frame in order to inform each sensor node to report its residual energy condition in the following transmitting time slots. When all of the above parameter values are obtained, the coordinator records this information in its memory and has the ability to execute the relay selection scheme.  
Then, we illustrate how to implement our relay selection scheme in two cases. In the first case where a WBAN is at the initialization stage, the coordinator will directly execute the relay selection scheme at the beginning of the first superframe since it has all values needed to execute the relay selection scheme and load the relay allocation results and the corresponding timeslot allocation in the beacon frame. Then, in the beacon transmission slot, the coordinator broadcasts the beacon frame to all of the sensor nodes in the network. As each node must listen and receive this beacon frame, all of the sensor nodes in the network will know their transmission strategy and their relay nodes, if needed.  
In the second case, e.g., a WBAN restarts, where the energy storage condition of sensor nodes is unknown, the coordinator sets a request flag in beacon frame at the beginning of the first superframe and allocates timeslots for each sensor node in the network to report their energy storage conditions. As a result, in the first superframe, sensor nodes send their energy storage information to the coordinator in their allocated report slots. After the coordinators have received all of the report frames, it invokes the proposed relay selection scheme and loads the results and the corresponding timeslot allocation in the next beacon frame, which will be broadcasted in the second superframe. Then, in the second superframe, each node will know its transmission strategy and their relay nodes.  
It should be emphasized that the low complexity of the rapid solution in our proposed scheme guarantees that the coordinator can finish the algorithm in the interval between the point when the coordinator has received all the energy storage reports to the slot for broadcasting the next beacon frame. Furthermore, it should be noticed that the implementation discussed here does not involve the detailed interaction procedures between the coordinator and sensor nodes that will be further studied in the future.