1 Introduction

The recent revolution in wireless communication and embedded systems has brought different types of wireless sensors with distinctive capabilities and objectives [1,2,3]. The medical sensor devices are one of the major outcomes of this revolution. These tiny and low power sensors are deployed either on the body or inside to create a Wireless Body Area Network (WBAN) that monitors the vital signs and physiological activities of the body. In this network, the sensors convey the gathered data to the coordinator (Sink), who subsequently transmits it through the internet to a medical station using a smart phone or PDA.

The huge number of elderly people increases the probability of chronic diseases and prompts frequent examinations. Additionally, the demand for the field of health care monitoring has grown significantly due to the high prices of hospitals’ services, particularly in poor nations that lack resources. The provision of daily medical care to incapable persons while they remain in their homes and avoiding the costs of these facilities has become a crucial necessity.

Research in [4,5,6] introduces a list of major application domains that can utilize WBAN to overcome the lack of resources and provide services in hazardous and complicated situations. Some applications are as follows:

  • Healthcare monitoring: Statistics shows that around 600 million persons are above 60 years old and expected to reach 1200 million persons in year 2025. This percentage needs early diagnosis in order to provide required treatment or even prevent serious diseases. Different types of parameters can be measured such as electrocardiogram (ECG), blood pressure, electroencephalogram (EEG), and body temperature.

  • Training schedules of professional athletes: Different types of sensors are devised for sports and fitness. They can monitor physiological parameters (e.g., gait length, oximetry, heart rate, and acceleration) to give self-assessment in addition to performance improvement.

  • Disability assistance: Assistance can be done in many ways such as posture detection, rehabilitation, activity tracking, and navigation for blind or deaf-blind persons.

  • Safeguarding applications: WBAN monitors the toxics levels in the air. A warning is issued to police officers, firemen, or troops who can benefit from this alert when the level becomes life-threatening.

WBAN is considered as a part of Wireless Sensor Network (WSN) that consists of sensors and actuators [7, 8]. Sensors record the body parameters such as temperature, blood pressure, and ECG, while the actuators do actions based on the received data. A WBAN’s generalized communication architecture is depicted in Fig. 1. Due to their small sizes, sensors are characterized with limited energy which is a critical issue especially for implanted sensors which are un-chargeable when batteries run out. The radiations emitted from the wireless communication is other concern since high sensors’ temperature affects the body tissues and may cause serious damages [9,10,11]. These issues motivated researchers to find proper routing algorithms that utilize sensors in an efficient manner. In their studies, a number of WBAN routing challenges have been addressed: first, designing a proper network topology, where a good design affects the network overall performance. Second, topological partitioning and disconnection caused by the postural movements or the short transmission ranges.

Fig. 1
figure 1

General communication architecture for WBAN

Research on WBAN routing has been proposed since the mid of 2000. The efforts have focused on designing protocols that can improve performance and network lifetime while overcoming the constraints of WBAN sensors. These protocols were grouped into categories such as postural movement based, energy aware, thermal aware, and quality of service aware routing [9]. The studies on [12,13,14,15,16] have focused on developing protocols that prevent the rise in sensors’ temperature. They assumed that either using the shortest route to destination as long as it is free from hotspots or using the un-visited coolest neighbor would be good enough. The algorithm in [16] assumed that a hotspot presence depends on the average temperature of the neighboring nodes and the node itself. Although those protocols were considered as most popular and mostly used temperature aware methods, they didn’t take energy conservation into consideration. Moreover, mechanisms used for avoiding the hotspots increase the delay of packet delivery. In the contrary of those studies, [17,18,19] designed solutions to overcome the shortage of power supply resources for the implanted sensors but at the expense of temperature awareness. Besides, these studies never address the network topology disconnection and partitioning problem caused by body movements.

Other researchers studied the effect of body postures on the network topology and performance [20,21,22,23,24,25]. Some of these studies focused on enhancing the link quality while saving the energy consumption. In recent years, researchers’ efforts focused on developing protocols that combine these three parameters: energy aware, temperature aware and postural movements [26,27,28]. However, such studies suffer from deficiencies. Although [26, 27] locate the sensors with higher data rates [26] or higher energy [27] near the sink, the burden of forwarding the data sensed by the node itself and others results in an early energy drain owing to the high load traffic. Moreover, due to postural changes, a node that loses connection with its parent sends a join request to the nearest parent in its range regardless of link quality. This process of maintaining broken links costs more energy. The authors of [28] select the neighbor with the minimum cost based on these three parameters to be a forwarder. A neighbor in the opposite side from the sink could be selected, which will cause the data packets to travel in longer paths to reach the sink. Furthermore, the restriction of the maximum hop counts that a packet can pass through although decreases delay time but increases the number of dropped packets.

The postural movement of the body leads to link deterioration and failure, which consequently affects the packet delivery ratio and increases delay time in WBAN. It is a significant challenge to create a reliable WBAN that can endure for a long period, especially while taking into account the sensors’ limited energy and the detrimental impacts of their high temperature. These challenges along with the the shortcomings of past research gave us the motivation to design a new routing protocol. The aim of this research is to:

  1. 1.

    Design a WBAN data routing protocol that conserves the energy of the sensors.

  2. 2.

    Avoid formation of hotspots (sensors with high temperatures) to protect body tissues from radiation.

  3. 3.

    Make the protocol adaptive and robust against frequent topological changes caused by different body postures.

  4. 4.

    Develop a mechanism to ensure loop free routing since data is forwarded in one direction towards the sink.

This paper proposes a novel adaptive WBAN routing approach that simultaneously takes into account the three characteristics: energy awareness, temperature awareness, and adaptability to postural changes, to achieve high reliability and maximum throughput. The designed algorithm consists of three main phases: setup phase, routing phase, and maintenance phase. A mathematical model based on a cost for choosing the next-hop is applied during the routing phase.

The remaining of the paper is organized as follows. Related work is briefly reviewed in Sect. 2. In Sect. 3, proposed approach is presented. Section 4 gives the simulation results of proposed approach in comparison to existing methods. Section 5 concludes the work.

2 Related Work

The routing protocols were designed to consider various objectives, such as efficient energy consumption, temperature awareness, and fast and reliable delivery of data. The protocols can be categorized into single and multi-hop protocols. In WBAN, a multi-hop communication is more desirable as the distance travelled by the data will be reduced which leads to less energy consumption. In [26], authors proposed an energy efficient and thermal aware prototype (M-ATTEMPT) for deploying heterogeneous sensors on human body. Nodes are arranged in descending order based on their data rates. A direct communication is employed for critical data transmission, while multi-hop is used for normal data delivery. The algorithm selects the route with minimum hop count and if two paths has same minimum hop count, then the path with the least energy consumption is selected. When sensing a hot-spot node, the route is changed to skip that node until it gets back to normal temperature. The proposed protocol also supports mobility of human body with energy management. However, the protocol had several deficiencies: 1- in case of dead nodes, there is no alternative route selection, 2- unbalanced load on the nodes, which leads to energy depletion and shrinkage in network lifetime. Authors of [27, 29] proposed a protocol to overcome the deficiencies of [26], in [27] nodes are placed according to energy levels and their initial energy is distributed in a way that nodes acting as relay are equipped with more energy. As in [26], nodes communicate effectively through relay nodes for sending normal data and directly for emergency cases. If the receiving nodes are alive, the route with the shortest hop count is selected. If not, alternative routes are selected.

In [17, 20], a cost function based on sensors’ residual energy and the distance from the sink is used to improve the network throughput and stability period. Node with the minimum cost value is selected as a forwarder. In each round, new forwarders are elected to balance energy consumption and prune down energy depletion of the nodes. [17] doesn’t support both movement postures and hot-spot sensing, while [20] studied the impact of mobility as [26] but only considered the arms’ mobility. As the arm moves towards the sink, a direct link is established. In the opposite scenario, the distance increases and in turn causes high path loss and energy depletion. In [30], the Mamdani approach (fuzzy logic) is used to select the parent node in the network based on residual energy. In [31], a technique named EERR (energy efficient and reliable routing) utilizes the residual energy information of all nodes from base station (BS) for cluster formation. A quantum behaved Particle Swarm Optimization based routing protocol called QRP is proposed in [32] to find the shortest and efficient route. QRP makes use of the ratio of the distance between sink and a node and the remaining energy of node in a fitness function. The node with least function value is selected as relay node.

In [23], Birgani et al used a multipath scheme based on on-demand routing. Initially, if there is no predefined route to destination, the node will start the route discovery by sending Route REQuest packet (RREQ) to its neighbors by flooding method. Whenever a neighbor receives unseen RREQ, it calculates the received strength factor (SF) of the upstream packet and multiplies it with the strength factor field contained in the packet. Whenever a RREQ reaches the sink, it creates a reply packet with the discovered paths and their SF. The path with highest SF is selected by the source. Through time and with patients’ movement, the route gets detached. In this case, the destination sends a packet of measurement based on the knowledge of routes. The receiving nodes update the SF of the packet by multiplying the strength factor (SF) of the upstream packet and SF field within the packet itself as explained earlier, and the source updates the route based on a threshold method.

Most routing protocols concentrate on selecting a path with minimum hop count for efficient energy consumption. However, [18] considered not only efficient energy consumption but also extending the network lifetime through even energy consumption. Thus, for each node that belongs to the set of the candidate forwarders, the node remaining energy is estimated and then the standard deviation (SD) of the residual energy for the set is calculated. The node with minimum SD is selected as a forwarder. The protocol not only extends the network lifetime but also satisfy the path loss of the nodes located at the back of the body, where these nodes transmit their data via relay node even in emergency cases considering that the probability of a multi-hop connection is higher than a single hop. The authors of [19] applied a relay node protection strategy when the nodes’ energy level degrades beyond a predefined threshold. Along with the strategy, the Dijkstra’s algorithm is applied on a weighted matrix of the estimated energy consumption in order to find the path that balances the energy of the nodes regardless of their locations from the sink. While [22] presents a protocol that enhances energy efficiency by two ways: first, using non-sensing nodes as relay nodes in addition to sensor nodes. Second, using only neighboring nodes moving towards the sink as relays. Selection is based on a cost function that considers how far the relay is from the sink, velocity component of relay towards the sink, and its residual energy.

The work in [12] proposes a thermal-aware routing algorithm (TARA), where every node monitors changes of its neighbors’ temperature to be aware of hotspots. A node that exceeds a predetermined minimum temperature limit is referred to as a hotspot. The node first delivers the packet to a relay with a minimal temperature; when it realizes that all of its neighbors are hotspots or that no relay is available, it applies a withdrawal strategy. In this strategy, the packet is returned back to sender to choose another route. Similar to TARA [12], Least Temperature Routing (LTR) and Adaptive Least Temperature Routing (ALTR) use the coolest neighbor to be a forwarder. However, unlike TARA, they maintain a maximum hop count for the packet and LTR discards the packet if it exceeds that threshold. While ALTR applies the shortest hop algorithm. Besides, both maintain a list of recently visited nodes to select the un-visited coolest node to avoid loops. ALTR applies a “proactive delay”such that the packet is delayed by one time unit when its coolest neighbor is a hotspot. Since TARA, LTR and ALTR send packets to the coolest neighboring nodes, the total temperature of the entire network along with the number of hops will become large. To compensate these drawbacks, LTRT finds the route with the least temperature from all possible routes. The forwarder temperature is considered as the edge cost in the network. One tradeoff of this protocol is the temperature of the nodes needs to be transmitted among the nodes. However, since the updating of sensor temperature is done periodically, this tradeoff is tolerated [15].

Movassaghi et al. [28] introduced a routing protocol that selects the next hop based on a cost function consisting of signal power, node temperature, and residual energy. Based on the information exchanged, every node calculates the cost of its neighbors and chooses the one with minimum cost function to be the next hop in the route to destination. When a packet passes through hops more than the allowed maximum hop count, then the packet is dropped.

In [25, 33], Probabilistic Routing with Postural Link Cost (PRPLC) and Distance Vector Routing with Postural Link Cost (DVRPLC) protocols are proposed to reduce the delay. Their study depends on calculating the link historical connectivity quality between all nodes in WBAN which is subject to be changed through time with postural changes. PRPLC selects a neighbor as a forwarder if the neighbors’ link likelihood to destination is greater than the node itself, else the node keeps buffering the packet. On the other hand, DVRPLC selects the node with lowest end-to-end cumulative cost if it needs to forward the packet. Liang et al [25] used the expected transmission metric (ETX) for estimating the link quality and then adjust the sensors’ power level accordingly. Therefore, they balanced the individual nodes consumption in addition to the total network consumption. The energy-efficient routing scheme (EERS) considers the path energy aware ETX as the cost for transmission. The path with the minimum ETX is the best path with respect to transmission quality and cost.

Recently, the work in [34] proposed a technique that divides the body region into three parts, upper, middle, and lower region. Nodes in the middle region have higher energy and send their data directly to the sink. While, the nodes in lower and upper regions have less energy and send their data via head node. Cluster head selection is based on the remaining energy and whale optimization algorithm is used. A similar goal is pursued by the authors of [35,36,37,38,39] to maximize the efficiency of the nodes’ energy usage. In [40], routing method is proposed in which single and multi-hop communications are employed, where single hop is for critical data sensors while multi-hop for sensors that are a bit far away from the sink node. In [41], distance and direction parameters are utilized for relay node selection in WBAN. Received Signal Strength Indicator (RSSI) is used to estimate the distance parameter and MUSIC algorithm is applied for estimating the direction parameter. These parameters are used to generate the fuzzy rule that decides which relay node to use. Critical data routing (CDR) approach is considered in [42] for transmitting the appropriate data from inner body node to the on-body medical super sensor node that act as a controller. In this approach, when the sensor senses data, it checks its threshold level and the sensed data is categorized as Critical if it crosses a certain threshold level, which otherwise is Non-Critical. The idea of this approach is to pick only the most critical data for routing, and discard all other information as soon as possible, so that nodes remain in sleep mode until their next time slots are available. A thermally aware routing algorithm is proposed in [43] that defines high and low priority levels for sensing information to maintain uniform temperature throughout the network when the data is forwarded to the sink node. Moreover, neighbors are selected based on their hop distance, temperature and energy to avoid forming hotspots.

Table 1 summarizes the comparison of the exiting related works.

Table 1 Summary of existing routing schemes in WBAN

Table 1 shows that all the above algorithms discuss one or two of the three parameters: thermal awareness, energy awareness, link quality and postural movements but not the combination of three. Also, these algorithms suffer from deficiencies as discussed earlier. Our proposed protocol overcomes the deficiencies of the existing algorithms while being energy aware, thermal aware and adaptive to postural movements.

3 Proposed Routing Approach

In this section, we first provide the assumptions considered in designing the proposed routing method for WBAN. Then in Sect. 3.2, we discuss the mobility support employed in the work. The detailed discussion of proposed routing approach is provided in Sect. 3.3.

3.1 Assumptions

In light of the assumptions made in many related studies including [17, 26, 29, 30, 43], we consider the following assumptions:

  1. 1.

    The destination node (sink) has infinite energy while the other sensors have finite energy.

  2. 2.

    Each sensor is aware of its temperature and residual energy.

  3. 3.

    Each sensor can reach the sink using the sensors’ full power.

  4. 4.

    Every sensor in the network can calculate the Euclidean distance with the other sensors in the network.

3.2 Mobility Support

A WBAN is a small network in which the nodes move in response to human movement. The topology changes as a result of this. It is challenging to predict how the human body will move. The position of the nodes fluctuate in response to body movement. In order to efficiently route data, nodes create wireless connections with their nearest neighbors. When a mobile node cannot locate its neighbors, it loses the sensed data. It is necessary for routing protocols to support mobility in order to tackle such situations [44]. We employ the mobility setting that is adopted in various related works ( e.g. [20, 26, 29, 30]). The mobile node in this scenario suffers from high path loss when the mobile node moves away from the sink. As a consequence, it needs to expend more energy to transmit the sensed data and a significant drop in throughput occurs.

3.3 Algorithm Design

We design a WBAN routing strategy that is energy aware, thermal aware and supports different body postures. Each node creates a subset of suitable relay nodes from the neighboring set. Consider a situation when a node needs to transmit a packet but the connection to the forwarder is lost. Instead of evaluating all of the neighbors, the proposed method selectively considers a subset of them in order to determine the best node to connect with. Additionally, choosing the subset from the neighbors closest to the sink will reduce overall delay and energy usage of WBAN. The best relay node is then identified from this subset using a mathematical model of cost function with energy, temperature, and link quality of the sensors as parameters. The routing algorithm operates in three main phases: (i) setup phase, (ii) routing phase, and (iii) maintenance phase.

3.3.1 Setup Phase

Assume that the WBAN consists of m sensor nodes \(S = (S_1, S_2,..., S_m)\) and the sink is denoted by S1. In this phase a directed acyclic graph (DAG) is built as a backbone of the WBAN. Initially, each sensor node broadcasts a Hello message through the WBAN and waits for the acknowledgment (ACK). The neighboring nodes reply with ACK message that comprises: the residual energy (RE) and temperature (T). Upon receiving the ACK messages, each node measures the Received Signal Strength Indicator (RSSI) from the adjacent nodes to estimate the link quality. After the nodes construct their neighboring lists \(N = (N_1, N_2,.\ldots , N_k)\), every node maintains a potential relay set \(R= (R_1, R_2,.\ldots , R_f)\) where \(R\subseteq N\). Neighboring nodes in the direction of the sink participate in this process. Thus, if a node \(S_i\) wants to send data to the sink \(S_1\), the neighbor \(N_k\) will be added to the relay set (R) only if

$$\begin{aligned} D(S_i,S_1)>D(S_i,N_k) \& \& D(S_i,S_1)>D(N_k,S_1) \end{aligned}$$
(1)

where, \(D(S_i,S_1)\) is the Euclidean distance between sensor \(S_i\) and \(S_1\). The algorithm of setup phase is given in Algorithm 1.

figure b

To understand the effectiveness of Eq. 1, we analyze the relay cost as follows: Consider Fig. 2. Suppose we have node \(S_i\), and relay node \(N_r\) and sink node \(S_1\). \(d_1\) is the distance between \(S_i\) and \(S_1\), \(d_2\) is the distance between \(S_i\) and \(N_r\), and \(d_3\) is the distance between \(N_r\) and \(S_1\).

Case 1: If relay node \(N_r\) is not employed, node \(S_i\) and \(N_r\) send k-bit data to \(S_1\), respectively; based on Eq. 6, the total consumed energy is given by:

$$\begin{aligned} E_{Non-Relay}= k \times E_{elec} + k \times \epsilon \times E_{mp} \times d_1^\epsilon + k \times E_{elec} + k \times \epsilon \times E_{mp} \times d_3^\epsilon \end{aligned}$$
(2)

Case 2: If relay node \(N_r\) is employed, node \(S_i\) sends its data to node \(N_r\). Node \(N_r\) performs data aggregation process and send data to sink node \(S_1\). Based on Eq. 6, the total consumed energy is given by:

$$\begin{aligned} E_{Relay}= k \times E_{elec} + k \times \epsilon \times E_{mp} \times d_2^\epsilon + k \times E_{elec} + k \times \epsilon \times E_{mp} \times d_3^\epsilon + k \times (E_{Rx-elec} + E_{DA}) \end{aligned}$$
(3)

When \(E_{Relay}< E_{Non-Relay}\), we will have simplified results as:

$$\begin{aligned} d_2 < d_1 \end{aligned}$$
(4)

Based on Eqs. 2, 3, and 4, the cost of energy when relay node is employed will be less than the cost of energy when relay node is not employed under the condition that Eqs. 4 is satisfied. Each node can choose an appropriate node to act as a relay node, and whenever a relay node receives data packets, it performs data aggregation process. After merging, the data is transferred to the sink or relay node of the relay node. Such a relay mechanism will improve the energy efficiency of the entire network.

Fig. 2
figure 2

An example of Relay Node

Figure 3 shows some valid relay nodes \(N_k\) while Fig. 4 represents invalid relay nodes \(N_k\). Figure 3 (a, b, c) show examples of three cases in which we have valid relay nodes \(N_k\) for node \(S_i\), where in the three cases the distance between node \(s_i\) and the sink node \(S_1\) is greater than the distance between \(S_i\) and \(N_k\) and the distance between \(N_k\) and \(S_1\). Figures 4 (a, b, c and d) show examples of four cases of invalid relay nodes, where in case of Fig. 4 a, the distance between \(S_1\) and \(S_i\) equals the distance between \(S_1\) and \(N_k\). In case of Fig. 4 b, the distance between \(S_1\) and \(S_i\) less than the distance between \(S_1\) and \(N_k\). While in Fig. 4 c and d, the distance between \(N_k\) and \(S_i\) is greater than the distance between \(S_1\) and \(S_i\). All these four cases violate the Eq. 1.

Fig. 3
figure 3

Valid relay nodes \(N_k\)

Fig. 4
figure 4

Invalid relay nodes \(N_k\)

3.3.2 Routing Phase

If a node detects an abnormal reading, it immediately sends the data to the destination (sink) using its full power. Otherwise, the node sends the packet using the multi-hop method. Sensor energy (RE), Temperature (T), and Link quality (RSSI) are used to determine the next hop based on a cost function.

Initially, if T of node \(S_i\) exceeds a predetermined threshold \(T_1\), then it waits until the temperature drops down unless it is an emergency packet which it sends directly to the sink instead of waiting. After drop down, node \(S_i\) calculates the cost value for each node \((R_1, R_2,...,R_f)\) in its relay set R based on a cost function as in Eq. 5. Next, the set is sorted based on these values in ascending order. The relay nodes are checked in order to find the next-hop \(R_i\). If the relay \(R_i\) exists, then \(S_i\) sends a control packet to \(R_i\) to check if the link between them is feasible. If no acknowledgement is received within a predefined period of time then the process is repeated for the next relay node in the sorted set and so on. Whenever the selection failed to find a new next-hop, a maintenance routine is called.

$$\begin{aligned} C_{R_j}(RE_j,T_j,RSSI_j)=log(w_1(RE_j)^{-1} + w_2(T_j) +w_3(RSSI_j)) \end{aligned}$$
(5)

where, \(C_{R_j}\) is the cost function and \(w_i(i=1,2,3)\) is corresponding weight. The log function is employed as nonlinear function due to its characteristics and it is commonly used.

3.3.3 Maintenance Phase

If a node \(S_i\) fails to identify the next hop from its relay set R, it would be due to the following reasons:

  1. 1.

    Movement of nodes \(R_i \in R\) or movement of source node \(S_i\) itself. In both cases, the relay nodes and \(S_i\) are not in the communication range anymore.

  2. 2.

    Sensors \(R_i \in R\) have temperature greater than threshold \(T_1\) or residual energy below \(T_2\). In this case nodes \(R_j\) are incapable of forwarding others’ data.

The following steps will be executed in order to find new relay nodes.

  1. 1.

    The node \(S_i\) broadcasts Hello message and waits for ACK from neighbors.

  2. 2.

    Any neighbor node that sends ACK and satisfies Eq. 1 will be added to the new relay set.

  3. 3.

    If the new relay set is empty, then drop the packet. Otherwise, routing will be done as mentioned in the routing phase.

Figure 5 shows the route maintenance operation of the proposed approach, where node \(S_i\) sends the data to the next hop neighbor node \(R_i\) after checking if it is within its communication range, and \(R_i\) has a temperature less than threshold \(T_1\) and residual energy greater than threshold \(T_2\). Otherwise, it decides to drop the packet because direct communication with the sink necessitates a large amount of energy and increases the probability of packet loss due to long distances.

Fig. 5
figure 5

Route maintenance process

4 Simulation Results

For the evaluation of the performance of our proposed approach, MATLAB has been used. The rich graphical interactive interface and user-friendly adaptability of MATLAB make it ideal for testing WBAN protocols and applications [45]. The simulation settings used is similar to that in [17]. We studied the performance of the proposed work and the results are compared with existing protocols: M-ATTEMPT [26], energy efficient multi-hop routing protocol (EEMP) [30], EERP [29], EERR [31] and SIMPLE [17]. The used energy parameters and radio model are similar to many previous studies [17, 20, 26, 27], which involves two main parts: receiving and sending messages. The sending energy consumption is further impacted by the distance to the destination. To transmit a k-bit message a distance d, the radio power consumption is:

$$\begin{aligned} E_{Tx}(k,d)=k \times E_{elec} + k \times \epsilon \times E_{mp} \times d^\epsilon \end{aligned}$$
(6)

and the radio power consumption to receive this message is:

$$\begin{aligned} E_{Rx}(k)=k \times ( E_{Rx-elec} +E_{DA} ) \end{aligned}$$
(7)

where, distance between sender and receiver is d, the cost of transmitting a k-bit message is \(E_{Tx}(k,d)\) for a distance d and the cost of receiving k-bit message is \(E_{Rx}(k)\). The electronics energy is \(E_{elec}\) and \(E_{Rx-elec}\) for transmitter and receiver, respectively. The amplification energy is \(E_{mp}\) and path loss co-efficient parameter is \(\epsilon\). Simulation parameter settings are presented in Table 2. As in [17], energy parameters for transceiver are shown in Table 3 for two transceivers used frequently in WBAN (Nordic nRF 2401A, Chipcon CC2420). The energy parameters of the Nordic nRF 2401A transceiver are considered since it consumes less power compared with Chipcon CC2420.

Table 2 Parameters used in Simulation
Table 3 Energy parameters

4.1 Performance Evaluation

We evaluate the performance of the algorithms based on the following metrics:

  1. 1.

    Network lifetime: The protocol should preserve the network energy so the network operations’ time will increase.

  2. 2.

    Stability period: Not only the network energy should be preserved but also the nodes themselves so the time until the fırst node dies should be increased.

  3. 3.

    Throughput: The protocol should have an efficient performance that increases the total number of packets successfully received at the sink.

  4. 4.

    Residual energy: The energy consumption should be minimized.

  5. 5.

    Path Loss: It is given as a function of distance d and frequency f as follows and measured in decibels (dB):

$$\begin{aligned} p(f,d)=P0+10 \times \upsilon \times log(\frac{d}{d_0})+X\sigma ,~~~~~P0=10 \times log(\frac{(4\pi f)^2}{c}) \end{aligned}$$

where, X is a Gaussian random variable and \(\sigma\) is standard deviation, P0 is the loss at reference distance \(d_0\), c is the speed of light, f is the frequency and \(\upsilon\) is the path loss coefficient which is propagation environment depended.

Performance Comparison Fig. 6 shows the lifetime analysis of the network under different algorithms. The proposed new cost function for selecting forwarding nodes plays an important role in balancing power consumption between sensor nodes. A new relay is selected each round based on the calculated cost function. Figure 7 clearly shows that the proposed approach has a longer stability period than M-ATTEMPT, EERP, EEMP, EERR and SIMPLE. This owes to the proper selection of new relays in each round by the proposed method. Therefore, each node consumes almost the same amount of energy in each round and all nodes die almost at the same time. Also, proposed approach improves the lifetime of the network in terms of the first node dies compared with M-ATTEMPT, SIMPLE, EEMP, EERP, and EERR up to 147%, 20%, 92%, 10%, and 359% respectively.

Fig. 6
figure 6

Performance analysis on Network lifetime

Fig. 7
figure 7

Performance analysis on Network stability

The average consumed energy analysis in each round is shown in Fig. 8. The proposed work uses a multi-hop topology in which each more distant node transmits its data to relay through a forwarding node. The forwarding node is chosen using the cost function mentioned above. Choosing the right conveyor in each round helps save energy. To transmit packets to the receiver, our approach uses a different forwarding node in each round. This limits the congestion of a particular node. The simulation results show that the proposed method consumes minimal power, which means that more nodes have enough power and more data packets are transmitted to sink. On the other hand, in M-ATTEMPT, due to heavy traffic, some nodes reach their power limits early. The proposed approach achieve a gain in reducing the average consumed energy until first node die with M-ATTEMPT, SIMPLE, EEMP, EERP, and EERR up to 57%, 17%, 8%, 2%, and 69% respectively.

Fig. 8
figure 8

Performance analysis on Residual energy

The successful packets received at the sink is referred to as throughput. Because WBAN contains critical and important patient data, it necessitates a protocol with the fewest packet drops and the greatest amount of successful data received at the sink. The proposed approach achieve high throughput than M-ATTEMPT, SIMPLE, EERP, EEMP, and EERR, as shown in Fig. 9. The number of packets sent to the sink is determined by the number of active nodes. More packets are transmitted to the sink as a result of more active nodes, which boosts network throughput. The stability period of M-ATTEMPT, EEMP, and EERR is shorter than the proposed method, EERP and SIMPLE protocol, indicating that lesser packets are being delivered to sink. As a result, the throughput of M-ATTEMPT, EEMP, and EERR reduced. Furthermore, the extended stability period of the proposed approach, EERP and SIMPLE leads to high throughput.

Fig. 9
figure 9

Performance analysis on Throughput

Figure 10 shows the path loss analysis results. Path loss depends on frequency and distance. The path loss shown in Fig. 10 is a function of distance at a constant frequency of 2.4 GHz. At that frequency, the path loss coefficient is 3.38 and 4.1 for the standard deviation (As in SIMPLE). The proposed approach reduces path loss, as shown in Fig. 10. This is because multi-hop transmission reduces distance, resulting in minimal path losses. Figure 10 shows the results of SIMPLE, M-ATTEMPT and the proposed. Initially, SIMPLE, EERP, EERR and M-ATTEMPT protocols works fine. However, after 2000 rounds, path loss in M-ATTEMPT decreased dramatically as some nodes in the M-ATTEMPT topology die. Also, path loss of SIMPLE, EERP, EEMP and EERR drastically reduced after 3000 rounds. The cumulative path loss is minimized when the number of alive nodes is kept to a minimum. The cumulative path loss is more in our proposed method since it has a longer stability period and more active nodes.

Fig. 10
figure 10

Performance analysis on Path loss

Table 4 provides a summary of the results. A diverse set of parameters and variables were taken into account when comparing the protocols, including their type of classification, network lifetime, stability period, criteria for each protocol, throughput and residual energy.

Table 4 Summary of Results

5 Conclusion

WBANs are highly significant for health monitoring systems because they enable monitoring of patient’s health continuously in real time. We proposed a method for routing data in WBANs in this paper. To select the best route to the sink, the proposed method employs a nonlinear cost function. The cost function is determined by the residual energy of nodes, their temperature, and distance from the sink. Nodes with the lowest cost function value are chosen as relay nodes. Other nodes become that node’s children and forward their data to the relay node. To validate our algorithm, five different metrics that includes residual energy, lifetime, throughput, path loss and stability are considered. When compared to M-ATTEMPT, SIMPLE, EEMP, EERP, and EERR, the proposed approach improves the lifetime of the network by 147%, 20%, 92%, 10%, and 359%, respectively. The proposed approach also achieves a reduction in average energy consumption until first node dies up to 57%, 17%, 8%, 2%, and 69% with M-ATTEMPT, SIMPLE, EEMP, EERP, and EERR, respectively. Based on our simulation results, we can conclude that the proposed routing scheme extends network lifetime and increases packet delivery to sink. The limitation of the proposed work is that the privacy and security are not ensured. As part of future work, we will integrate the proposed work with health monitoring frameworks for the Internet of Medical Things (IoMT) and extend the current work to consider privacy and security. Additionally, compression techniques along with a novel hybrid optimization algorithm may be considered in the future.