# An Energy-Efficient Routing Protocol for Reliable Data Transmission in Wireless Body Area Networks
## 4 Energy-Efficient Routing Protocol for Reliable Data Transmission in WBAN
### Routing Process
#### 4.2.2 Next Hop Node Selection Based on Maximum Benefit Function \(M_{i}\)  
The best next hop node is the node with the largest \(M_{i}\) value, which satisfies the following formula:  
\[\hat{i}=\underset{i}{\text{argmax}}[M_{i}]=\underset{i}{\text{argmax}}[ \alpha*\gamma_{i1}+\beta*\gamma_{i2}+\theta*\gamma_{i3}+\lambda*(1-\gamma_{i4}) ],i=1,2,\ldots,N \tag{11}\]  
In the practical application of WBAN, different priority data need to be classified and processed to satisfy the Qos requirements of different data [34]. For P1 priority data, the data are generated randomly and its traffic is small, but the real-time and reliability requirements are extremely high. Because emergency data means abnormal physiological data, which will endanger people's lives and health, a smaller delay may cause irreversible tragedy. Therefore, it is necessary to increase the weights of parameters such as node transmission efficiency, available bandwidth and hops to the sink. For example, we can set the weights to 0.1, 0.3, 0.4, 0.2 to ensure timely and reliable transmission of emergency data. However, for P2 priority data, we should reduce energy consumption as the premise, and properly increase the weight values of residual energy parameters. For example, we can set the weights to 0.5, 0.2, 0.2, 0.1, which can balance the energy consumption of nodes and satisfy the reliable data transmission. The algorithm for dynamically select weight values for different priority data is presented in Algorithm 1.  
```
0: the weight value for the data of node \(i\);
0: Process:
1: if node \(i\) has packet to send then
2: Judge the priority of the packet;
3: else
4: end
5: end if
6: if the packet belongs to P1 priority then
7: Select the weight value for P1 priority;
8: else
9: Select the weight value for P2 priority;
10: end if
11: Retune the weight value for the data of node \(i\);
```  
**Algorithm 1**Dynamically select weight values for different priority data  
The best next hop node selected has more residual energy, higher transmission efficiency, wider available bandwidth and smaller hops. It can not only satisfy the low delay and reliable communication between nodes, but also balance the energy consumption of nodes and prolong the network lifetime. In addition, the protocol stipulates that the total number of hops in multi-hop routing should not exceed three hops. The algorithm for the best next hop selection is presented in Algorithm 2.  
Because the energy of network nodes is limited, this protocol sets a minimum energy threshold \(E_{min-th}\) for each node. When the residual energy of the network node is greater than that threshold, it is allowed to enter the NT as a candidate for the next hop. When the residual energy of the network node is lower than that threshold, it will exit the NT and no longer acts as the next hop. At this time, the node will not forward the information of other nodes but only transmit its own packets. Setting the \(E_{min-th}\) can not only avoid a node acting as a relay many times, but also balance the energy consumption of the network, improve the energy utilization efficiency, and prolong the network lifetime.