1 Introduction

Currently, traditional healthcare systems are facing many challenges due to an increasing proportion of elderly people and the insufficient supply of financing. This situation emphasizes the necessity for systems that can continuously monitor the health of the elderly and patients, transmitting this information to remote care providers or hospitals. Consequently, scientists and researchers are driven to develop cost-effective solutions for remote medical healthcare and patient monitoring to address this demand.

Wireless Body Area Network (WBAN) has been emerging as a new trend and attractive technology to satisfy these demands and provide appropriate healthcare solutions [1]. The successful deployment of WBAN in many fields particularly in e-healthcare systems for monitoring the health status of remote patients makes these kinds of networks more attractive than other solutions [2, 3]. A WBAN is a collection of sensor nodes that can dynamically organize and configure themself with the sink node. The sensor nodes in WBAN are implanted on or inside the human body to gather and transmit different physiological data about the functioning of the human body through the sink node to the remote data center for monitoring. Once the data reaches the remote data center, it’s made available to healthcare professionals. This information serves as a real-time health status update, allowing physicians to closely monitor the patient’s well-being, detect anomalies or trends, and make informed decisions regarding the patient’s care and treatment [4]. The architecture of the WBANs can be divided into three layers [5,6,7], as demonstrated in Fig. 1. Tier-1 within a WBAN consists of sensors that are either attached to the body surface or implanted within the body itself. These sensors serve the crucial function of gathering a wide array of physiological data, capturing information vital for monitoring an individual’s health status. The types of sensors in Tier-1 can vary significantly based on the specific health parameters being monitored. They might include biosensors for tracking heart rate, electrocardiogram (ECG) sensors, temperature sensors, blood glucose monitors, accelerometers, or specialized sensors tailored to monitor particular health conditions. Tier-2 consists of devices like personal computers, smartphones, or other intelligent electronic devices that serve as intermediate nodes or gateways within the network. These devices gather information from sensors worn or implanted on the body. Tier-3 in a WBAN typically involves the terminal data center, which comprises remote servers hosting diverse applications. Its primary role centers on aggregating, analyzing, and generating dynamic responses based on the data received from Tier-2 devices. One critical aspect of this dynamic response is the ability to detect abnormal or critical data captured by the sensors in real time, which triggers emergency transmissions and alarms.

Fig. 1
figure 1

Architecture of WBAN communication

Designing and implementing WBANs comes with several unique challenges due to their resource constraints such as limited battery capacity, bandwidth, memory, and processing capabilities [1]. Issues related to the battery capacity of the sensor nodes and reliability are the most significant issues in the designing of WBAN [4, 8] because the sensor nodes in WBAN particularly those implanted within the human body, make battery replacement difficult. This network also generates a lot of sensory data, therefore in order to continue to function properly and to remain longer, they need to balance the energy consumption. Due to this fact, the WBAN developers are forced to consider multi-hop routing techniques in order to conserve node energy and prolong the lifetime of the WBAN [9]. Unfortunately, most route failures occur frequently in WBAN because of restrictions energy of nodes, rapidly draining rate energy, available bandwidth, and body movement. For this reason, designing an efficient routing protocol plays a significant role in improving energy efficiency, and optimizing the overall performance of WBAN. Many different protocols and approaches have been developed for various wireless networks or traditional sensor networks [10,11,12,13,14]. However, these protocols cannot be directly applied to WBAN applications due to the unique network structure and working environment of WBANs. In recent years, many routing protocols have been proposed for WBANs which use single metrics such as minimum hop count, residual energy of the node, or signal strength to establish the route to transmit data packets. This single metric is not adequate for constructing the optimal route since it may frequently result in route breaking causing the routing protocol to discover an alternative route. In this case, the route discovery process consumes additional network resources, decreasing the performance of networks, reducing the lifetime of the network, and causing network partitioning issues [10, 11].

Conversely, improving the effectiveness of a WBAN’s route selection strategy can be accomplished by integrating multiple routing metrics and employing an adaptable approach to select the most reliable nodes from which the optimal route to a destination node (sink node) can be established [15, 16].

Based on the above analysis, this paper provides a new adaptable mathematical model to calculate multiple metrics of the nodes and propose an efficient routing scheme by selecting reliable nodes having sufficient energy capacity, bandwidth, minimum drain rate energy and hop count to construct the optimal route for transmitting reliable data packets between the source sensor node and sink node. Utilizing the notion of a reliable node when constructing the optimal routes not only assures reliable and efficient routing of data transmission but also reduces the probability of route breakage, distributes energy consumption among nodes, and maximizes the lifetime of the network. The main contribution of the paper is summarized as follows:

  • The proposed routing scheme uses a novel mathematical model to compute the routing cost estimation function for selecting the optimal route between the source sensor node and the sink node.

  • To calculate the route cost estimation, multiple metrics are considered such as remaining energy, drain rate energy, energy harvesting, available network bandwidth, and hop count.

  • A novel mechanism is also proposed to dynamically change the route and find an alternative route if the remaining energy of the intermediate node participating in the route becomes less than a certain threshold value during data transmission.

  • SEBA defines two types of communications based on the remaining energy of nodes and different priorities data of WBAN: Single-hop routing (direct transmission) and multi-hop routing (transmission via an intermediate node)

  • By the evaluation of performance and analysis results the proposed routing scheme outperforms the AMCRP (Adaptive Multi-Cost Based Routing Protocol) [17], EEMP (Energy Efficient Multi-hop Routing Protocol) [18], and EAR (Energy Aware Routing) [19] protocols.

The remaining section of the paper is organized as follows: Sect. 2 presents the related work; Sect. 3 and 4 describes the proposed routing protocol in sufficient detail; Sects. 5 and 6 present the simulation environment and discuss the experimental results; Finally, the conclusion and future works have been presented in Sect. 7.

2 Related works

The routing protocols are the main elements of the communication network system. In the past few years, several routing protocols have been proposed for WBANs. These protocols can be classified into two types of communications: single-hop and multi-hop communications [16, 20, 21]. In the single hop, each sensor node can transmit data packets directly to the sink node. Single-hop communication is suitable for sensors that have emergency data, low energy capacity, or sensors located near the sink node. However, this communication is ineffective since nodes located further away from the sink consume more energy and have less efficient performance than multi-hop when transferring data to the sink node. In multi-hop communication, a forwarder node sends data packets to other nodes within its transmission range thus reducing the route loss and extending the network lifetime [22]. Multi-hop communication has been proven to be a more efficient communication strategy and performs better on WBAN [17, 23, 24]. The following discusses some of the state-of-the-art routing protocols for WBANs.

In [25] Panhwar et al. proposed a routing scheme for WBANs based on a meta-heuristic genetic algorithm. The proposed routing protocol calculates the distance of the sensor nodes to select the optimal route. However, their protocol relies on the short path to select the route from the sensor node to the sink. This metric is not sufficient to construct the optimal route in a WBAN. It does not take other significant metrics into account that may affect the route quality and prolong the lifetime of the network. In [26] Ahmed et al. presented the PEDTARA routing protocol for WBANs that considers different metrics such as priority, temperature, energy, and delay. Additionally, they use the multi-objective Spider Monkey Optimization (SMO) technique and a hybrid chaotic optimization approach known as MGCSMO that combines genetic operators and chaotic maps to enhance the SMO. This routing scheme divides the data transmission in the WBANs into on-demand data, normal data, and emergency data. The authors demonstrated through simulation that their scheme outperforms other routing schemes in terms of metrics such as congestion, delay, temperature, and network lifetime. However, their routing scheme does not consider the energy drain rate and mobility of sensor nodes during establishing the route. In [27], Wang et al. proposed the fuzzy control-based Energy-Aware Routing Protocol (EARP), which takes into account the hop count, link quality, and residual energy. These three metrics are utilized to select data forwarders while considering the limited sensor energy, data loss and delay, and timeliness and reliability of data transmission. The processes of fuzzification, fuzzy inference, and defuzzification are used to calculate each metric. The optimal forwarder node is then chosen by applying the greatest path benefit function. A PLQE routing protocol was proposed by Iqbal et al. [28] to handle network partitioning and reliable data transfer in WBAN. The optimal route between the source sensor and sink node was evaluated based on the expected probability indicator (EPI) and the link reliability factor (LRF). However, their routing scheme might not optimize route selection due to ignoring some significant node metrics such as drain rate energy and channel diversity of the node.

Hai et al. [15] presented a temperature-aware routing protocol for WBAN. In the proposed scheme, the fuzzy logic system is proposed as an adaptable mathematical model to calculate the next forwarder node value and propose an efficient routing strategy by choosing reliable nodes to construct an optimal route. However, temperature-aware routing schemes avoid forwarding packets from hotspot nodes, resulting in reduced throughput and increased end-to-end delay. In order to reduce the frequency of link failures and lengthen the stability period, Kiran et al. [29] developed a new routing protocol based on the residual energy, node distance, and signal strength between the sensor and sink node. However, the protocol has significant flaws including the inability to provide an alternate route in the case that a node in the network fails, and an unbalanced load on the nodes which causes energy depletion and decreases the lifetime of the network. Anbarasan et al. [30] proposed a routing system named blockchain-assisted delay and energy-aware healthcare monitoring (B-DEAH) system to obtain high network throughput, maintain low transmission loss, and high stability of the network period. However, this scheme is more complex due to the inclusion of multiple modules for various operations which leads to a decreased energy capacity of the nodes rapidly.

Salim [16] designed a WBAN data routing scheme to preserve the energy of the sensor nodes. This scheme uses a nonlinear cost function to determine the optimal route between the sensor node and the sink node. The residual energy, temperature, and distance from the sink are employed to calculate the cost function. A node with a minimum value of cost function is selected as a reliable node to construct the route. This scheme has the disadvantage of not taking data packet priority into account which is crucial in wireless body area networks that deal with medical data. Bedi et al. [31] proposed a cluster-based WBAN routing protocol to improve energy efficiency by combining machine learning and the grey wolf optimization (GWO) algorithm with Q-learning. Machine learning is utilized to estimate the energy consumption or lifetime of a cluster, while the GWO algorithm with Q-learning is employed to determine the optimal cluster head selection for data transmission. The authors demonstrated the efficiency of their routing scheme in terms of parameters such as residual energy, network longevity, and path loss. Mohanty et al. [32] proposed a new Enhanced Glow Worm Swarm Optimization (En-GWSO) model to improve the energy-efficient multi-hop routing in WBAN. In their proposed scheme the routing decision is based on the remaining energy of the sensor nodes, mobility, and link quality. This protocol considers multi-hop communication for data transmission. This type of communication In WBANs is not sufficient because certain data needs to be sent from the sensor node to the sink node directly. Furthermore, they also employ complicated mathematical models to find the route that causes high energy consumption and increasing delay in the network. Kamruzzaman et al. [33] emphasize the integration of optimization techniques, Smart Grid technologies, and renewable energy sources to design an energy-efficient and sustainable WBAN routing protocol for healthcare applications. In order to minimize energy consumption and increase network reliability, a routing scheme was developed by Shunmugapriya et al. [34]. The main criteria considered when choosing the relay node are the estimated distance based on RSSI and the direction determined by the MUSIC algorithm.

Many proposed routing schemes focus on the use of optimization algorithms to select the optimal forwarder node for transferring data to the sink node. However, these algorithms have higher complex mathematical structures in operations which leads to the exhaustion of each node battery while constructing the optimal route between the sensor and sink node. Since these algorithms cannot provide good results in the case of frequent topology changes, reducing energy consumption, end-to-end delay, etc. In contrast to the aforementioned protocols, the proposed SEBA protocol uses a simple routing approach to select the best forwarder nodes that can take part in the communication. Thus, this routing scheme can reduce computation costs, balance the energy consumption among sensor nodes, and extend the lifetime of the nodes in the network. The comparison of some other existing routing protocols with merits and demerits is shown in Table 1.

Table 1 Summary of existing routing protocols in WBANs

3 Proposed routing scheme

The proposed routing scheme overcomes two major issues faced by WBAN with traditional routing protocols such as network lifetime and energy consumption. The use of hybrid communication between the sensor nodes and the sink node extends the lifetime of the network and reduces the energy consumption of the nodes in the network. The following subsections provide a detailed description of the proposed routing protocol.

3.1 System model

In the proposed routing scheme, multiple-purpose sensor nodes are placed on a patient’s body as shown in Fig. 2. These sensor nodes are positioned in the patient’s entire body at the proper sensing locations. All sensor nodes have the same initial energy and transmission range. The energy of nodes begins to deplete after a specific duration of operation. The energy level may gradually decrease to zero. To avoid this situation and keep sensor nodes in the network for as long as possible, an energy threshold value is employed to take appropriate action when any sensor node is on the verge of dying. If the energy level of the sensor node is less than or equal to the threshold, the node is termed a dead node in the network. In this case, it solely sends its own data packets to the sink node. Furthermore, the proposed scheme selects new forwarder nodes in each round to balance energy consumption and reduce the depletion rate energy of nodes.

Fig. 2
figure 2

Schematic and node deployment strategy for proposed SEBA routing protocol

The proposed routing protocol employs both single-hop and multi-hop communication. Single-hop communication is used for sensor nodes that need to transmit data immediately after collecting emergency data observations. Multi-hop communication is also used for transmitting normal data and sensor nodes that are located a long distance away from the sink node. If these sensor nodes transmit data packets through a single hop, then they consume more energy due to the large distance involved from the sensor nodes to the sink node. Additionally, multi-hop communication can decrease energy consumption and maximize the lifetime of the network [17, 46, 47]. The proposed routing scheme is adaptable and has the capability of operating in both normal and emergency data traffic conditions. Furthermore, this scheme has the ability to improve the performance of the WBAN by considering multiple metrics such as the maximum remaining energy of sensor nodes, energy harvesting, minimum hop count, draining rate energy of sensor nodes, bandwidth, and priority of sensed data.

3.1.1 Calculation of energy harvesting

Energy harvesting in WBANs involves capturing and utilizing ambient energy from the human body or the surrounding environment to power or recharge devices like sensors or wearable devices within the network. The aim is to reduce reliance on traditional batteries and enable sustainable, long-term operation of these devices[42]. Recently, many routing protocols for WBAN with energy harvesting have been proposed [48,49,50,51,52]. In this proposed protocol, sensor nodes use human heat to charge the battery. The energy harvesting is calculated using the following equation:

$${EH}^{i}\left(\uptau \right)= {\int }_{{\text{t}}}^{{\text{t}}+\uptau }{\complement }_{{\text{r}}}^{{\text{i}}}\left({\text{t}}\right){\text{dt}}$$
(1)

The equation calculates the total energy harvested by sensor node i within the time duration τ by integrating the rate of energy harvesting \({\complement }_{{\text{r}}}^{{\text{i}}}\left({\text{t}}\right)\) over that time period.

3.1.2 Calculation of remaining energy of sensor nodes

Nodes’ energy consumption is an important consideration in the selection of reliable and qualified forwarder nodes, which work together to enhance the entire network performance. The WBANs’ sensor nodes have limited energy capacity because they operate on batteries. Therefore, the sensor nodes’ battery life should be considered while choosing a set of forwarder nodes to construct a route to a sink node in the network. Furthermore, the sensor nodes operate in four states which are transmitting, receiving, idle, and sleeping states. The energy consumption in the idle and sleeping states is low, hence the transmitting and receiving statuses of nodes are taken into account when designing the routing algorithm of the proposed routing scheme. In the proposed routing scheme the residual energy of the sensor nodes takes into account as the remaining energy of the sensor nodes during the route discovery process. The sensor nodes participate in constructing the route that has the highest remaining energy. Researchers have proposed various radio models to study energy characteristics and communication between the sensing nodes [24, 53]. The model provided in [24] is used as a model in the proposed routing protocol due to the following two main reasons: (a) It is less complex and (b) shows the communication scenarios that are strongly associated with WBANs. The following equation is used to calculate the remaining energy of the sensor node due to sending and receiving m bit data:

$${EC}_{rx}\left(m\right)= {EC}_{elec }\times m$$
(2)

where \({EC}_{rx}\left(m\right)\) represent the energy consumption by receiving m bit data.

$${EC}_{tx}\left(m,D\right)=\left({EC}_{elec}\times m\right)+({EC}_{amp}+m+{D}^{2})$$
(3)

where \({EC}_{tx}(m,D)\) signifies the energy consumption to transmit m bit data to the node at a distance. \({EC}_{elec}\) denotes the energy consumption by the circuit when the sensor node receives or sends data packets and \({EC}_{amp}\) represents the energy used by the power amplifier when transmitting data. Hence, the total energy consumption of node i in all transmitting and receiving at time t can be calculated as follows:

$${EC}_{i}\left(t\right)= {EC}_{rx}+{EC}_{tx}$$
(4)

Most of the existing routing protocol in WBAN considers only the residual energy of the node without draining rate energy when constructing the route. However, this metric is not sufficient since if a node in the route has maximum residual energy, then the maximum number of packets can be transmitted through the node. In this case, the energy capacity of the node decreases rapidly. To address this issue, the proposed routing scheme takes the drain rate energy of the nodes into account when calculating the route cost estimation function. Here, the remaining energy of sensor node i can be expressed as:

$${\omega }^{i}(t)= \frac{\left({E}_{initial}^{i}\left(t\right) - {EC}_{i}(t)\right)}{{Dr}_{i}(t)}$$
(5)

where \({Dr}_{i}(t)\) denotes the drin rate energy of the node i at time t. It can be calculated as follows:

$${Dr}_{i}\left(t\right)= \frac{{EC}_{i}\left(t+\Delta t\right)- {EC}_{i}(t)}{\Delta t}$$
(6)

From all the possible routes \({R}_{j}= {N}_{s}, {N}_{1} ,{N}_{2}, \dots , {N}_{D}\), where \({N}_{s}\) is the source sensor node and \({N}_{D}\) is the sink node, \(\varphi\) is the number of hops from \({N}_{s}\) to \({N}_{D}\) and a function \(R({\omega }^{i})\) represents the remaining energy of the node \({N}_{i}\) then the average minimum remaining energy (\(A\alpha\)) and average summation of remaining energy (\(A\beta\)) for the route \({R}_{j}\) is computed as:

$${A\alpha }_{{R}_{j}}=\frac{{Min}_{\forall {\omega }^{i}\in {R}_{j}}R\left({\omega }^{i}\right)}{\varphi }$$
(7)
$${A\beta }_{{R}_{j}}= \frac{\sum_{\forall {\omega }^{i}\in {R}_{j}}R({\omega }^{i})}{\varphi }$$
(8)

where \(\varphi\) denotes the minimum number of hops to the sink node from the source sensor node. \(\varphi\) to the sink is calculated as follows:

$$\varphi = \frac{Max{H}_{c}-{H}_{c} }{{MaxH}_{c}}$$
(9)

where \(Max{H}_{c}\) is the maximum hop count permitted by the protocol and \({H}_{c}\) stands for hop count.

When selecting the Route Cost Estimation (RCE), the proposed routing scheme checks to determine whether the following conditions:

i. If there is a route with a minimum remaining energy (\(\alpha\)) is greater than or equal to the threshold value:

$${A\alpha }_{{R}_{j}\in {T}_{r}}\left({R}_{j}\right)\times \varphi \ge {Th}_{value}$$
(10)

Selects a route with the maximum RCE between the average remaining energy summation (\(\beta\)) and the threshold value:

$$RCE=Max {R}_{j\in {T}_{r}}( {A\beta }_{{R}_{j}}- {Th}_{value})$$
(11)

ii. Else select a route with the maximum RCE between the average minimum remaining energy and the threshold, that is:

$$RCE=Max {R}_{j\in {T}_{r}}({A\alpha }_{{R}_{j}}- {Th}_{value})$$
(12)

where \({T}_{r}\) is the set of all possible routes and \({Th}_{value}\) denotes a predefined threshold value of energy. The RCE is used by the sink node to obtain the most often updated state of the route in order to determine an optimal route to the source sensor node.

3.1.3 Estimation of available link bandwidth

Available bandwidth in WBANs is one of the constraints faced. The entire bandwidth of a channel is not available for data transmission. Various communication-related overheads consume a portion of the bandwidth. These overheads include tasks such as initiating communication, maintaining network connectivity, managing routing protocols, dealing with network congestion, and handling interference from other nodes. The bit transmission speed, or the rate at which data can be transmitted over a communication channel, is indeed directly proportional to the available bandwidth. A higher available bandwidth allows for faster transmission of data. In this routing scheme, the bandwidth estimation method from [54, 55] is used. In this method, bandwidth consumption is calculated if any sensor node transmits/ receives any type of data. The measurement period \(\Delta\) is updated periodically at every \(\Delta\) time. The measured radio link capacity C depends on the packet size and cross-traffic intensity [56]. Therefore, all types of communications for all types of the packets (transmits/forwards/receives) at the nodes are considered. This communication period is called \({P}_{busy}\). The idle period of a node (i.e. \({P}_{idle}\)) from Eq. (13) can be calculated as follows:

$${P}_{idle}=1- {P}_{busy}$$
(13)

Then, the available bandwidth \({BW}_{n}\) at node n is calculated by Eq. (14):

$${BW}_{n}= \left(\frac{{P}_{idle}}{\Delta \times C}\right)$$
(14)

In the proposed scheme, if the bandwidth of an optimal route is not sufficient to meet the requirements for transmitting data packet, an alternate route with the next maximum remaining energy for sending the data packet is preferred. This iterative process continues until a route is found that can provide sufficient bandwidth to meet the requested bandwidth of the data packet. In this scheme, the sink node selects the maximum available bandwidth route amongst received routes. The following equations represent the mathematical model to find the route with sufficient bandwidth:

$${R}_{{BW}_{s,d}}=Min \{{\delta }_{s,{n}_{1},}^{1}, {\delta }_{{n}_{1},{n}_{2},}^{2}\dots \dots \dots , {\delta }_{{n}_{\left(i-1\right)},d}^{i}\}$$
(15)
$${\gamma }_{s,d}=\left\{\begin{array}{c}2 \times BW \le \sum_{i-1}^{n}{R}_{BW}\left(i\right), good\\ 2 \times BW > \sum_{i-1}^{n}{R}_{BW}, bad\end{array}\right.$$
(16)

To calculate the time complexity for the successful delivery of a data packet from the source sensor node to the sink node in the network using Eq. (17):

$$\mu \left(i\right)=O(\frac{{n}_{i} \times k}{2}\times {log}_{{n}_{i}})$$
(17)

4 Routing process

The following subsections explain the routing process of the proposed routing scheme, which is divided into three phases: network initialization, route discovery, and route maintenance. Figure 3 displays the flowchart of the whole routing procedure.

Fig. 3
figure 3

Flow chart of the proposed routing protocol

4.1 Initialization phase

In this phase, the source sensor node generates and sends the beacon message (BM) to identify neighboring nodes within its transmission range. When a node receives BM, it updates or appends the relevant data (such as minimum remaining energy, summation remaining energy, and available bandwidth) and rebroadcasts it to other neighbor nodes. This method is continuous until every node is identified in the network.

4.2 Route discovery process

The route discovery phase is responsible for finding the optimal route among all possible routes to send the data packets to the sink node. The proposed SEBA routing protocol improves the routing selection process compared with the existing schemes, which leads to maximizing the lifetime of the sensor nodes in WBAN.

4.2.1 Receiving beacon message (BM) at the neighbor node (N N)

Receiving a beacon message from neighbor nodes is processed as follows:

Step 1: When a source sensor node (NS) wants to transmit data packets to the sink node (ND), it first checks whether there is a route to the ND in its routing table (rt). If the route exists and satisfies the condition, then the data packet sends through the route. Otherwise, NS node generates BM to find the optimal route and sends it to the neighbor (NN) nodes in their transmission range, as shown in Fig. 4.

Fig. 4
figure 4

Flowchart of beacon message (BM) and probe message (PM) processing by SEBA

Step 2: On receiving a BM, an NN checks the NS ID and beacon ID in rt to ensure the beacon message is new.

Step 3: If the NN node receives a first or duplicate BM with a greater sequence number (SeqNo), it updates the minimum remaining energy (\(\alpha\)) and the sum of the remaining energy (\(\beta\)) fields of the BM as indicated below and then rebroadcast the BM:

$$\alpha = Min(\omega_{cn} , \omega_{BW} )$$
(18)

where \(\alpha\) represents the minimum value between the remaining energy of the current sensor node \(({\omega }_{cn})\) and the remaining energy of the beacon message \({(\omega }_{bm})\).

$$\beta = (\omega_{cn} + \omega_{BW} )$$
(19)

where \(\beta\) indicates the summation value between the remaining energy of the current sensor node \(({\omega }_{cn})\) and the sum of the remaining energy of the beacon message \({(\omega }_{bm})\).

Step 4: Received BM is dropped if the BM is not the first or SeqNo is not greater than the SeqNo previously received in the rt.

4.2.2 Receiving beacon message at the sink node (ND)

When the ND receives a beacon routing message, the following process will be performed:

Step 1: By checking NS ID and beacon ID in rt, the ND determines whether the beacon routing message has been received for the first time or not.

Step 2: If ND receives the BM for the first time, it computes the route cost estimation (RCE), and the value is kept in rt. Then ND set a waiting time (\(\Delta \tau\)) to receive another redundant BM.

If (\(\alpha \ge {Th}_{value}\))

$$RCE=\left(\left( \frac{\beta }{\varphi }\right)- {Th}_{value}\right)$$
(20)

Else

$$RCE=\left(\left( \frac{\alpha }{\varphi }\right)- {Th}_{value}\right)$$
(21)

Step 3: If the BM is not the first, the ND verifies the \(\Delta \tau\).

Step 4: If the BM waiting time (\(\Delta \tau )\) is not expired, then the ND computes RCE for the newly arrived BM at ND and compares it with the value of RCE that has been entered on the rt.

Step 5: If the new value of RCE is greater or equal to the value of RCE in rt, then the ND updates the rt entry with the arriving copies of the BM. Otherwise, it discards the arrived BM.

Step 6: The ND continues to receive the rest of BM and executes step 4 to calculate RCE until \(\Delta \tau\) is expired.

Step 7: After the \(\Delta \tau\) expires, the ND generates the prob message (PM) based on the maximum value of RCE and sends it back to the NS, which starts the process of discovering the route.

4.3 Dynamic route change mechanism

The energy of the sensor nodes involved in the route will be reduced while data packets are being transmitted on the optimal route.In order to check whether the energy of the node is still greater than a threshold value or not, the proposed routing scheme uses unicast route change request (RCRQ) and route change reply (RCRR) messages. When a route is being utilized for transmitting data packets, if a sender node (source sensor node or forwarder node) discovers a node on the route that is close to the energy threshold value, the sender node will send an RCRQ message to the sink node via a neighbor node which indicates a better node to the sink node. The intermediate sensor nodes will forward the message based on their routing table. Upon receiving the RCRQ message, the sink node generates an RCRR message and sends it to the source sensor node. This means the new route is available if the RCRR arrives at the sender node successfully. Then the sender node updates its routing table to use the new route for sending the rest of the data packets to the sink node. Also, every forwarder node updates the corresponding route RCRR message.

4.4 Illustrations

In this section, the work of the proposed SEBA scheme is illustrated with an example. The route discovery process in SEBA starts with a source sensor node. In this phase, the source sensor node generates and broadcasts a beacon message (BM) to its neighbor nodes. The BM contains various information such as the source node ID, sink node ID, sequence number, minimum remaining energy, sum remaining energy, etc. Figure 4 is used to demonstrate how SEBA handles the route discovering process. Let’s assume NS represents the source sensor node and ND represents the sink node. NS transmits a BM to its neighbor nodes (NN). Figure 4 displays the node’s ID inside the circle and the node’s remaining energy above the circle. Upon receiving the BM, an intermediate node calculates its minimum remaining energy and sum remaining energy from NS to the node itself and then updates the minimum remaining energy and sum remaining energy in BM.

Let’s assume that the minimum remaining energy value of N2 and N3 is 44 and 27 J (J) respectively. Therefore, the minimum remaining energy of N3 is 27J because N3 remaining energy is lower than the value of the minimum remaining energy on the BM received from N2 which is 44J. Therefore, N3 updates the minimum remaining energy filed with its own remaining energy and the sum remaining energy filed with the sum of N2 and N3, which is 71J, and then rebroadcasts the BM. If the remaining energy value of a node is greater than or equal to the value in BM, no adjustment is performed to the minimum remaining energy field. For instance, the minimum remaining energy of N6 is 15J, which is greater than the minimal remaining energy of the BM received from N5. Therefore, the minimum remaining energy field of the BM remains unchanged. This process continues until the BM arrives at the ND. When the ND receives the first BM, it set a timer to collect all possible BM. After the timer has expired the ND generates and sends the probe message (PM) back to the NS via the route that has the maximum value of RCE. In order to comprehend how the proposed protocol operates, three cases are compared as follows:

Case 1: Select the optimal route based on the minimum hop count between NS and ND. Because route \(<{N}_{S}\to {N}_{5}\to {N}_{6}\to {N}_{D}>\) has the minimum number of hops which is 2, this route is selected among all routes to transmit data packets from NS to ND.

Case 2: Select the route based on the maximum summation of the remaining energy. The routing cost function for the routes \({R}_{1}= <{N}_{S}\to {N}_{2}\to {N}_{3}\to {N}_{4}\to {N}_{D}>, {R}_{2}= <{N}_{S}\to {N}_{5}\to {N}_{6}\to {N}_{D}>, {R}_{3}= < {N}_{S}\to {N}_{7}\to {N}_{8}\to {N}_{9}\to {N}_{10}{\to N}_{D}>\) is 96, 12, and 139 respectively. Hence, among all possible routes received by ND route R3 has the maximum summation. In this case, R3 is used to transmit data packets.

Case 3: If possible select the route with the maximum summation of the remaining energy and a minimum number of hops, otherwise select the route with the largest minimum remaining energy and a minimum number of hops (the proposed routing scheme considers case 3). The proposed scheme chooses the route with the maximum route cost estimation (RCE). The RCE value for routes R1, R2, and R3 is 20, -9.5, and -9.75 respectively.

Therefore, for data transmission, the SEBA routing scheme selects R1 which has the maximum value of RCE.

Case 1 chooses the shortest path without taking the nodes’ remaining energy into account. As a result, case 1 does not guarantee to prolong the lifetime of the network and balance the energy consumption among sensor nodes. Case 2 chooses a route with the maximum sum of the remaining energy. However, it faces major issues with lifetime and hop count since it may still select a route with nodes that have a small amount of remaining battery capacity, as illustrated in Fig. 4. Case 3 addresses the issues of Case 1 and Case 2 by taking into account the remaining energy of sensor nodes and hop count as a significant cost function during the route discovery process. Therefore, the proposed routing protocol constantly selects a route that increases the lifetime of networks through the use of energy-capable sensor nodes and distributed loads across sensor nodes utilizing either a large summation of the remaining energy or maximum remaining energy.

4.5 Data transmission

The transfer of data starts after establishing the optimal route between the source sensor node and the sink node. In the proposed scheme, hybrid communications (single-hop and multi-hop communication) are used for data transfer to the sink node within the WBANs as shown in Fig. 5. This hybrid approach aims to reduce the energy usage in order to improve network lifetime and optimize data transmission ofWBAN based on factors such as remaining energy levels of sensor nodes and the priority of data being transmitted. The sensor nodes in the network assess their remaining energy levels against a predefined threshold. If the energy is less or equal to the threshold or if emergency data needs to be sent, they use single-hop communication to directly transmit data to the sink node. Otherwise, sensor nodes with sufficient energy levels and non-emergency data (normal data) use multi-hop communication. This method involves transferring data through intermediate nodes (forwarders) before reaching the sink node. In multi-hop communication, the proposed routing protocol selects the best forwarder nodes to construct the optimal route. When a node transmits emergency data and another node transmits normal data, and both nodes select the same forwarder node in this case the emergency data has priority to use the forwarder node based on the order of priority. Algorithm 1 shows the pseudo-code of the proposed algorithm to find an appropriate route at the neighboring and sink node.

Fig. 5
figure 5

Hybrid communication between the source sensor node and sink node

Algorithm 1
figure a

Pseudo-code for the route discovery process in SEBA routing protocol

5 Simulation environment

5.1 Simulation setup

Network Simulator 2 (NS2) was used to evaluate the performance of the proposed SEBA routing scheme which is compared with AMCRP, EEMP, and EAR routing schemes under different scenarios such as varying data rates and number of rounds. The IEEE 802.15.6 was employed for the physical and MAC layers in the simulation. In this study, 15 sensor nodes and 1 sink node are considered inside the human body. After several empirical tests, the center of the patient’s body is the most suitable position for the sink node implantation. Similar placements have been used by the authors in [17, 24, 52, 57, 58], as this allows the sink node easier to find the sensor nodes and enables successful data aggregation. Sensor nodes are uniformly distributed in the human body and continually capture human physiological data and send it to the sink node. The traffic from the blood pressure, glucose, Electromyogram (EMG), Electroencephalogram (EEG), and Electrocardiogram (ECG) sensors is given higher priority and is regarded as emergency data traffic [16, 43]. Table 2 describes the remaining simulation parameters that were employed in the simulation.

Table 2 Simulation parameters

5.2 Performance metrics

Several quantitative metrics can be used for evaluating the performance of WBAN routing protocols. The following popular performance-evaluated metrics have been used in the simulation of the proposed SEBA routing protocol.

  • Average network throughput: It can be calculated as the average number of data packets that successfully reach at the sink node per unit of the simulation time.

  • Packet delivery ratio (PDR): It can be defined as the ratio of the number of packets successfully reaching the sink node to the total number of packets transmitted by the source sensor node.

  • Normalized routing load (NRL): It can be represented as the total number of routing control packets transmitted by all sensor nodes in the entire WBAN during the period of the simulation.

  • Average end-to-end delay (Avg. EED): It can be calculated as the average amount of time needed to transfer data packets between a source sensor node and sink node while including all delays in propagation, buffering, and queuing delays.

  • Energy consumption: Energy consumption refers to the energy needed during the send, receive or forwarding procedures of a packet towards a system node through the entire time interval.

  • Network lifetime: It can be represented as the amount of time a WBAN remains until all of its sensor nodes die.

6 Results and discussion

The performance of the proposed SEBA routing protocol with AMCRP, EEMP, and EAR is analyzed in this section. Energy awareness is important to design the cost functions for all three of these protocols. Thus, for performance comparison, AMCRP, EEMP, and EAR protocols have been selected. The performance is compared based on the metrics mentioned in subSect. 5.2.

6.1 Varying data rates

Figure 6 and Table 3 compare the average throughput with varying data rates in the network. It can be seen that the throughput performance of the proposed SEBA routing protocol is significantly higher than EAR, EEMP, and AMCRP routing protocols. This is because the SEBA scheme considers significant node energy metrics (i.e. remaining energy, energy harvesting, draining rate energy) and available bandwidth than other routing schemes when selecting the route, whereas the other three routing schemes do not consider these metrics, particularly when a link fails occurs due to minimum energy of nodes or available bandwidth. The SEBA selects the route that has a higher energy level or available bandwidth among all possible routes. Therefore, the link becomes more stable and has fewer data packets drop at the end, which in turn maximizes throughput. Furthermore, SEBA has the maximum lifetime of the network compared to AMCRP, EEMP, and EAR. The prolonged lifetime of the network plays a crucial role in transmitting and receiving more data packets. The throughput of AMCRP is relatively higher than EEMP and EAR since AMCRP combines single-hop and multi-hop communication to transmit data packets and improve link stability, so the stability period of AMCRP is larger than EEMP and EAR. This implies that the AMCRP transmits a large number of data packets to the sink node. The EAR and EEMP protocols have lesser throughput since they do not take reliable communication between nodes into account. Consequently, it reduces the probability that data is successfully transmitted to the sink in a particular period, which significantly impacts the throughput of the network. Additionally, the network stability period and network lifetime of the EAR and EEMP are shorter than the proposed routing protocol. As a result, the throughput is also low.

Fig. 6
figure 6

Avg. throughput vs data rates

Table 3 Results of the EAR, EEMP, AMCRP, and proposed SEBA protocols with different data rates

Figure 7 demonstrates the analysis of SEBA, AMCRP, EEMP, and EAR protocols in the packet delivery ratio (PDR). Compared with AMCRP, EEMP, and EAR, SEBA has a higher PDR at varying network loads, because it considers the link quality of the neighbor nodes in the link cost function, which leads to selecting the neighbor nodes with the best link quality for constructing the most efficient route to the sink node. The higher link quality and lower packet loss ratio lead to increasing the PDR while AMCRP, EEMP, and EAR do not consider the quality of the link. In this case, the link breakage occurs frequently and the node needs to initiate a route discovery process to update the routing table. That increases the control packet and congestion over the network; The time required to update the routing table increases the end-to-end delay packet delays and the PDR significantly decreases. Furthermore, the SEBA routing protocol uses an efficient mechanism to change the route automatically to balance the energy consumption among sensor nodes and select the best forwarder node in the network to construct the optimal route. In this case, the nodes remain in the network for a long time and can send more data to the sink. However, the existing protocols EAR, EEMP, and AMCRP have complex routing methods to select the forwarder nodes and take more time to establish a route between the source sensor node and the sink node.

Fig. 7
figure 7

PDR vs data rates

Figure 8 demonstrates the performance comparison of SEBA, AMCRP, EEMP, and EAR routing schemes in terms of normalized routing overhead. As shown in the figure, as the data rate increases the normalized routing overhead of AMCRP, EEMP, and EAR increases drastically. This is because of the transmission disruption, increased packet losses, and retransmission. Additionally, it increases route breakage and the demand for route maintenance which leads to flooding the network with control packets. In this case, the routing protocols’ overhead increases as more control packets flow over the network. As a result, AMCRP, EEMP, and EAR routing schemes demonstrate decreased NRL performance. It can be also observed that the NRL of EAR is higher than that of EEMP, AMCRP, and SEBA, especially at high data rates due to EAR does not support single-hop communication to transmit emergency data to the sink node, which is a significant overhead generated by intermediate nodes along the route to find a new route. By contrast, the proposed routing scheme has the ability to provide high performance compared to AMCRP, EEMP, and EAR routing protocols. The reason is that SEBA employs the efficient novel dynamic route change mechanism to decrease the number of route errors and route discovery processes. In addition, SEBA combines the energy capacity of each node, available bandwidth, and hop count as significant cost metrics while constructing the route unlike AMCRP, EEMP, and EAR thereby minimizing frequent failures of links and new route discoveries due to node battery failure and insufficient bandwidth. As a result, the number of control packets remains low and the delivery of data packets remains consistent, which leads to improved NRL performance. On the other hand, the presented results indicate that the NRL of the AMCRP is lower than that of EEMP and EAR. This is due to the fact that the AMCRP selects energy-efficient routes for data transmission over extended periods, subsequently decreasing the need for retransmitting control packets caused by node battery failures. As a result, the AMCRP protocol minimizes channel contention, packet collision, and routing overhead compared to EEMP and EAR protocols.

Fig. 8
figure 8

NRL vs data rates

Figure 9 shows the impact of various network loads on the performance of the proposed SEBA routing protocol against AMCRP, EEMP, and EAR routing protocols in terms of average end-to-end delay (Avg. EED). It can be observed that from the figure and Table 3 when the network load increases, the Avg. EED of each routing protocol increases. However, the Avg. EED of the proposed scheme is smaller than AMCRP, EEMP, and EAR schemes. The reason is that SEBA constructs the optimal route based on the link that has the minimum delay and high reliability for transmitting normal and emergency data between the source sensor node and the sink node. Additionally, the proposed SEBA routing scheme uses single-hop communication to send emergency data directly to the sink node or when a node’s residual energy is less than or equal to the predefined threshold. This mechanism plays a significant role in reducing the Avg. EED on the network. On the other hand, AMCRP and EEMP mainly depend on the minimum distance and prioritize routes without considering link status and do not take any action to improve choosing a route by keeping link variations in view. Furthermore, frequent route breakages in AMCRP and EEMP have a significant impact on decreasing the Avg. EED performance of the protocols because the node needs to suspend the forwarding packets in the buffer for long intervals until the new route is found. This increases the queuing delay and hence finally increases the Avg. EED. Moreover, the Avg.EED of the EAR protocol is higher than AMCRP and EEMP. This is because hop count is not taken into account as a cost metric by EAR. Consequently, during route discovery, a roue with more hops may be chosen for data transmission, which increases the end-to-end delay.

Fig. 9
figure 9

Avg. EED vs data rates

6.2 Varying number of rounds

To analyze the energy efficiency of the routing protocols in WBANs, it is vital to determine the energy consumption of each round. Figure 10 and Table 4 demonstrate the energy consumption of the proposed SEBA routing scheme against the other three existing routing schemes. It can be observed that with increasing rounds, energy consumption increases in the case of all routing protocols. However, the proposed scheme has less energy consumption than other routing schemes in each round. This is due to the proposed SEBA scheme using a route cost estimation function to select an energy-efficient route for data communication with the lowest probability of link failures in the route. The failure of a node or link allows rerouting and constructing a new route from the source sensor node to the sink node in multi-hop routing. This leads to the extra energy usage of nodes, increasing the probability of network partition, and decreasing the lifetime of the network. Furthermore, the SEBA scheme proposed an efficient simple mathematical model with minimum energy consumption compared with three routing protocols to find the optimal route between the source sensor node and sink node, whereas AMCRP, EEMP, and EAR protocols use complex computations with the maximum energy consumption during the route discovery process. In this case, the sensor nodes consume a significant amount of their energy for computations. Furthermore, On the other hand, the proposed routing scheme uses a new dynamic route change mechanism to find a new route. This mechanism plays a vital role in reducing the number of route errors, maximizing the network lifetime, and distributing loads among sensor nodes in the network.

Fig. 10
figure 10

Energy consumption vs number of rounds

Table 4 Results of the EAR, EEMP, AMCRP, and proposed SEBA protocols in different rounds

Figure 11 depicts the comparative analysis of the proposed scheme SEBA against AMCRP, EEMP, and EAR in terms of network lifetime. In the figures when the number of rounds increases the lifetime of the network decreases in all routing protocols. This is due to the data packets transmitted over the network increase. Consequently, each node in the network consumes an amount of energy, leading to a decline in the lifetime of the network. Table 4 indicates that the SEBA routing scheme outperforms AMCRP, EEMP, and EAR protocols by effectively running the network for a longer period of time before the first node’s energy runs out. The improved network lifetime performance is because the proposed scheme uses a low remaining energy prevention mechanism to avoid the nodes as relay nodes during establishing the route. Furthermore, SEBA employs multi-hop communication for transmitting data packets in order to balance the energy consumption among nodes. Compared with the EEMP and EAR schemes, the AMCRP attains a longer network lifetime since the network stability period of AMCRP is larger and considers the priority of data to transmit over the network. Furthermore, the curve of the EAR protocol decreases rapidly when the number of rounds increases because its routing mechanism is too simple. This simplicity becomes a disadvantage, especially over long communication distances, where using the routing method based solely on minimizing hop count results in a lower probability of successful data transmission. Consequently, the EAR protocol consumes a significant amount of energy for data retransmission, and the network lifetime of this protocol is low. Similar to EAR, the EEMP protocol uses the majority of its energy for data retransmission and does not take reliability factors into account when building the cost function, which results in a high transmission failure rate. However, the residual energy of the sensor nodes is taken into consideration by the cost function. Compared with the EAR protocol, the protocol is slightly higher in network lifetime.

Fig. 11
figure 11

Network lifetime vs number of rounds

7 Conclusions

This paper proposed a simple novel energy-efficient aware and predicting bandwidth estimation routing protocol for routing data in WBANs. The proposed routing scheme uses the route cost estimation function to select the route between the source sensor node and the sink node. The route cost estimation is determined by the minimum remaining energy, sum remaining energy, bandwidth requirement, and hop count. The SEBA assesses the status of nodes during the route cost calculation. The route with the maximum cost estimation value is selected as the optimal route among all possible routes. In addition, SEBA uses a dynamic route change mechanism to decrease the number of route errors and route discovery processes. SEBA routing scheme can react rapidly to the node’s energy that becomes less than or equal to a threshold value during data transmissions and can select an alternative optimal route to send the rest of the data packets to the sink node. After thoroughly evaluating the proposed routing protocol provides a significant performance advantage over existing routing schemes in terms of average throughput, end-to-end delay, network lifetime, distributing loads, balancing the energy consumption among sensor nodes, and increasing data packet delivery to sink. Future research will use the Q-learning algorithm to take into account more metrics in order to enhance the Quality of Services and further enhance the energy efficiency of the proposed scheme.