MBMQA: A Multicriteria-Aware Routing Approach for the IoT 5G Network Based on D2D Communication

: With the rapid development of future wireless networks, device-to-device (D2D) technology is widely used as the communication system in the Internet of Things (IoT) ﬁfth generation (5G) network. The IoT 5G network based on D2D communication technology provides pervasive intelligent applications. However, to realize this reliable technology, several issues need to be critically addressed. Firstly, the device’s energy is constrained during its vital operations due to limited battery power; thereby, the connectivity will suffer from link failures when the device’s energy is exhausted. Similarly, the device’s mobility alters the network topology in an arbitrary manner, which affects the stability of established routes. Meanwhile, trafﬁc congestion occurs in the network due to the backlog packet in the queue of devices. This paper presents a Mobility, Battery, and Queue length Multipath-Aware (MBMQA) routing scheme for the IoT 5G network based on D2D communication to cope with these key challenges. The back-pressure algorithm strategy is employed to divert packet ﬂow and illuminate the device selection’s estimated value. Furthermore, a Multiple-Attributes Route Selection (MARS) metric is applied for the optimal route selection with load balancing in the D2D-based IoT 5G network. Overall, the obtained simulation results demonstrate that the proposed MBMQA routing scheme signiﬁcantly improves the network performance and quality of service (QoS) as compared with the other existing routing schemes.


Introduction
Nowadays, we are highly dependent on wireless devices, as they are flexible and straightforward to communicate with other users around the globe. The majority of people have access to smartphones, which have become the most common device of this decade. As people expect large bandwidth and connectivity in remote places, researchers are working on a paradigm of 2d-hoc networks to connect a large group of devices without the presence of infrastructure or central control units [1,2]. Ad-hoc networks can support sharing resources between devices as well when there is no present management entity in the network, which is commonly known as a server. The next-generation networks, including vehicular ad-hoc networks [3], cognitive radio [4], mobile ad-hoc networks (MANETs) [5], wireless sensor networks (WSN), the Internet of Things (IoT) [6], 5G networks [7], etc. prefer employing a peer-to-peer model rather than a client-server model, as it offers additional flexibility and scalability. The peer-to-peer model utilizes distributed services across the network rather than at a single location. Thus, when a connection loss occurs, it will not affect communication between other devices. Although the peer-to-peer networks are highly scalable and do not require any infrastructure setup, they possess security issues due to inner and outer threats. 5G is prevalent in wireless communication technologies with the exponential growth of smart devices and a massive amount of information exchange between users. 5G networks feature lower latency, higher capacity, and increased bandwidth compared to conventional cellular networks, as shown in Figure 1. The D2D communication in 5G has attained significant consideration and is now viewed as a promising technology for IoT networks due to its high data rate, low transmission delay and high power efficiency [8][9][10][11][12]. The IoT is the foundation of D2D communication, which incorporates billions of internet-connected devices. With the high amount of information collection and integration from/to a large number of devices, the IoT 5G network-based D2D communication technology has potential with the promise of realizing pervasive and intelligent applications for improving quality of life for people living in a connected world [13,14]. A general scenario of D2D communication-based 5G IoT networks is shown in Figure 1. In this figure, eNodeB stands for Evolved Node B, which is used as a cellular network. The D2D communication based on the IoT 5G network concept is explored by researchers worldwide due to network deployment flexibility. It supports peer-to-peer high-speed data transmission without fixed infrastructure. Since a governing body in the D2D communication-based IoT 5G network is unavailable, and the devices are in random movement, the already challenging network is made further complex. This constant random movement becomes a challenge since it does not allow the re-use of previously calculated routes. Routing schemes conventionally implemented in network infrastructure are not suitable here due to the massive route calculations and the constant changes in network topology. Therefore, the research community has developed various routing protocols to address the challenges that arise from the mobility of the devices in the networks [15][16][17][18]. Most of the previous works on routing protocols solely considered a single path to route traffic, limiting the devices' ability to utilize all the links towards the destination efficiently. In order to improve the performance of the network, multi-paths have been considered by researchers in recent years. They have become the optimum solution for the D2D communication-based IoT 5G network and its derivatives. Multiple links can significantly enhance the performance and efficiency of the network, as devices will be able to balance the traffic load between different paths leading to the same destination [19,20].
Another challenge faced by the D2D communication-based IoT 5G network is that mobile devices are equipped with limited battery power; therefore, energy utilization must be optimized to maintain the network's activity. Various strategies have been adopted in order to save energy, including limiting the broadcast to a cluster to share the information of the required energy or remaining within the metric of the routing protocol [21][22][23]. Most of the suggestions to save energy were solely based on single-path routing protocols. However, selecting the same path every time to forward the traffic from the source to the destination node impacts the routing protocol efficiency and affects the battery life of the intermediate devices. Thus, low efficiency was obtained when the same path to a destination was selected to forward the traffic, reducing the battery life of the devices. On the other hand, a large proportion of overhead traffic generation to repair the routes when established routes become obsolete due to the random movement of the devices leads to higher consumption of energy, and affects the performance of the routing protocol.

Contribution
This study is focused on improving the network performance by introducing the Mobility, Battery, and Queue length Multipath-Aware (MBMQA) routing scheme for the IoT 5G network based on D2D communication. This study aims to discover several ultimate routing paths to the destination while balancing workload to all the devices so that the battery consumption of specific devices could be reduced and the mobility would not affect the routing of the packets. An algorithm for route computations was developed based on each node's available parameters, including the battery's energy level, mobility information, and queue length size of the devices. A multiple attributes route selection metric is also presented to quantify the stated information into making a decision for selecting the best path among multiple paths towards the destination device. Therefore, this proposed MBMQA routing scheme aims to select the optimal route from source to destination devices which mitigates devices energy consumption, balances devices traffic load, and improves the network and route stability during data transmission.
The rest of the paper is organized as follows: Section 2 presents the related literature, while Section 3 consists of the details of the protocol and mechanisms that have been employed to compute the multi-path routes, simulation setup, and measurements that have been collected. Section 4 highlights the collected results and presents the evaluation of the proposed method compared to other methods. Finally, Section 5 contains the conclusion along with future work and recommendations.

Related Works
The concept of ad-hoc networks was first introduced in Near-term digital radio (NTDR) in the early 1990s and soon evolved into vast clusters of networks comprised of several hundreds of devices connected together without any relay or intermediate devices.
Networks that support such devices are termed the D2D communication-based IoT 5G network, which does not rely on previously deployed infrastructure. Devices on this network are capable of forming connections on their own without the aid of intermediate relays to provide connectivity to devices [24,25]. The positions of devices in the D2D communication-based IoT 5G network are not defined, while freedom is provided in initial positions. Free movement of the devices is considered a challenge for the designers in order to retain a record of every device position so that the communication can be alive while devices are free to move. Routing protocols are responsible for providing feasible routes to the required destination devices at a given time to ensure that the performance is not compromised and expectations in terms of QoS are met [26][27][28][29]. Throughout the years, scholars have executed various approaches to discover the appropriate routing protocol in terms of fault tolerance, scalability, performance, reliability, improved resource utilization, feature specificity, improved QoS, etc. The ad-hoc network routing is divided into two groups, proactive and reactive, based on the possibility of finding the path before or after a packet is sent to its destination. The proactive routing protocols tend to find all paths beforehand, while the reactive routing protocols are activated merely when a packet is sent to a destination, and only one path is computed to ease the load on the device and maintain the flow of information. Infrastructure-based networks are fixed and deployed in a managed scenario where the administrator can set and implement its policies. Therefore, the proactive type is well-suited for such types of networks. On the other hand, ad-hoc networks tend to rely on the devices to carry out the traffic and provide routing decisions while they are portable, mobile and require less computing power. For this reason, reactive routing protocols are the first choice that has low power consumption since it is selfmaintained and can find routes solely when needed for a particular destination. However, reactive routing protocols are designed to find a single path to the destination due to the complexity of the network. In recent years, considerable advancement in processing power has been made, while multiple paths to a single destination could be easily computed. Multiple paths could further improve the network's performance by allowing devices to balance the traffic load from source to destination via multiple links. The number of recent findings are summarized in this section, which focuses on multi-path routing protocols for the D2D communication-based IoT 5G network [30,31].
In [32], the authors proposed an Energy-Efficient Cloud-Assisted Routing Mechanism (EECRM) for Cloud Assisted-Mobile Ad-Hoc Networks (CA-MANETs). The Bellman-Ford algorithm was modified for a fast route recovery mechanism to select an alternate route when link failure occurs among the devices. In this paper, the authors introduced three new functions named Service Scheduling, Information Update and Information Notice for maintaining connections in the CA-MANETs. The EECRM scheme has minimized energy consumption, enhanced routing performance, and extended the lifetime of CA-MANETs. Meanwhile, in [33], the authors introduced an effective energy harvesting-aware routing algorithm (EHARA), in which an energy harvesting mechanism was utilized to investigate the issues of energy efficiency, QoS, network lifetime, and heterogeneity of IoT devices. The proposed routing scheme exploited two cost metrics, such as harvested energy and the residual energy of the device, to select the optimal path for forwarding data packets from the source to the destination devices. The EHARA scheme enhanced device lifetime, the network's QoS, and energy efficiency with various traffic loads for distributed heterogeneous IoT networks. Next, in [34], the authors investigated a Spectrum aware Energy-Efficient multi-hop multi-channel routing scheme for D2D communication in IoT mesh network (SpEED-IoT). They utilized a radio environment map (REM) in a multi-hop routing protocol which was able to discover the optimal route, the best channel among the devices and optimal power transmission for each hop. The proposed scheme deploys a selective flooding technique to minimize the route discovery flooding packets in the network that lead to energy consumption attenuation. In this paper, the authors suggested that the SpEED-IoT scheme maximized overall network data rate optimization performance and ensured fairness, unlike spectrum agnostic-or greedy-based route assignment.
Moving on to the research conducted in [35], the authors proposed a Lightweight On-demand Ad hoc Distance-vector Routing Protocol for mobile IoT networks (LOADng-IoT-Mob). The LOADng-IoT-Mob routing scheme allows the network device to track the position and manage the availability of neighboring devices through the harnessing of periodically controlled messages. Consequently, the devices select the best path by avoiding sending the data packets toward a broken path based on the received signal strength, leading to network enhancement and QoS stability. As a result, the LOADng-IoT-Mob approach has achieved a higher data rate, minimized delay, and improved energy efficiency in the mobile IoT network. On the other hand, the authors in [36] proposed an optimal routing approach based on the trusted connectivity probability (T-CP). Their main aim was to select the optimal route for multi-hop social-based D2D communications with decode-and-forward relaying in the 5G IoT. The authors introduced a rank-based trust model to measure the trust probability between two D2D devices. The results showed that the optimal route design in multi-hop D2D communications for 5G IoT applications is mainly based on the location of the base stations. This can be illustrated in the situation where there is a random location of the base station, and the CP-based metric selects the optimal path between the source and destination devices.
With respect to the research in [37], the authors studied the mobile user relay selection mechanism to achieve the optimal expected delivery ratio and two-hop delay in the narrowband Internet of Things system with D2D communication. The dynamic programming-based technique is used to handle the optimization problems and obtain the optimal working schedule of the relays. The results proved that the proposed scheme enhanced system performance in comparison with the other state-of-the-art algorithms. In [38], the authors proposed a multi-antenna transceiver design and multi-hop D2D communication to provide efficient data transmission and escalate the UAV coverage for the IoT in disaster scenarios. In general scenarios, network coverage of a single UAV is limited due to constrained transmission power; in their study, multi-hop D2D links were leveraged to increase UAV coverage effectively. The shortest path optimal routing was established with the minimum number of devices in the path. The closed-form solutions of the number of hops and the outage probability were used for the uplink and downlink. The proposed scheme significantly improved the network throughput and outage probability and guaranteed the QoS for UAV wireless coverage of the IoT in disaster scenarios. In article [39], a novel Local Voting distributed node scheduling algorithm was proposed. This algorithm tried to semi-equalize the load (defined as the ratio of the queue length over the number of allocated slots) through slot reallocation based on local information exchange. The algorithm stems from the finding that the shortest delivery time or delay is obtained when the load is semi-equalized throughout the network. Moreover, it was proven that the proposed algorithm achieves better performance than the other distributed algorithms in terms of average delay, maximum delay, and fairness. In addition, the authors in [40,41] presented and investigated key recent advances of network slicing toward enabling several Internet of Things smart applications. A taxonomy was devised for network slicing using different parameters: key design principles, enablers, slicing resources levels, service function chaining schemes, physical infrastructures, and security.
Subsequently, in [42], the authors proposed a proactive approach and cluster formation mechanism to utilize the decision-making process in wireless networks with D2D cooperation to optimize network reliability. The authors suggested a heuristic approach that combines with linear optimization problem formulation to provide high efficiency for high-density device networks, such as IoT and WSN networks. The proposed approach improves network reliability and prolongs the network lifetime. Their work manipulates the Multipath-Optimized Link State Routing Protocol version 2 (MP-OLSRv2) [43], presented by B. Perrein et al., which is a hybrid multi-path routing protocol. The MP-OLSRv2 balances the load among multiple paths in order to discover destinations and forward the data to their respective forwarding relay. It is categorized as a reactive routing protocol and does not retain the record of every destination; nevertheless, it randomly selects a path as requested by a device in the network. Though it is not guaranteed that the same path will always route to the same destination, route entries are held in reserve for a short duration of time; then they expire due to changes in the network's configurations. MP-OLSRv2 efficiently selects multiple devices and forms multiple paths to the destinations.
The devices selected along the path(s) are termed Multi-Point Relay (MPR). The MPR is utilized to broadcast topological alterations in the network to spread updated information regarding the device's position across the network. The MP-OLSRv2 routing protocol does not consider the energy information of the devices; therefore, the low-energy devices will be turned off once all of their residual energy is consumed. This could occur, since there is an excellent chance that the same device could be selected as an MPR to reach a certain destination, which would drain the battery. In [44], the authors introduced hybrid multi-path energy and quality of service (QoS)-aware optimized link-state routing protocol version 2 (MEQSA-OLSRv2) to provide a tradeoff between energy efficiency and QoS in IoT networks. For optimal path selection between source and destination devices, their work utilized device rank metrics according to multiple criteria (energy and QoS) to evaluate link quality during multiple path computation. Flooding of the topological information is reduced by selecting the highly energy efficient MPR sets of the devices in the network. The MEQSA-OLSRv2 significantly enhanced the network QoS in the heavy traffic load and high-mobility scenario networks by transmitting data packets over multiple disjointed paths based on link quality assessment.
Thus far, all the studies reviewed above have considered a single metric factor, such as mobility, energy consumption or queue length size of the device, for route computerization. However, based on the literature, as per our knowledge, none of the research combines all three parameters in a single route computational metric in an IoT 5G network based on D2D communication. Therefore, this paper combines the mobility, energy consumption, and queue length size parameter into a single route selection metric with the back-pressure algorithm to investigate the network performance.

System Model
The D2D communication-based IoT 5G network has been modelled by a graph G(V, E), wherein the V denotes the set of devices and E denotes the links between these devices. The packets are injected from the source device i, i ∈ V and flow on multiple paths in order to reach their destination. Every device i can specifically interact with its neighboring devices within its range. If the destination is not on the neighbor list, it will utilize the routing protocol to transmit the data packets toward the destination device. A direct link from device i to j is denoted by (i, j), while the transmission data rate matrix link is . .}. The routing variable data rate of a packet destined for device flow on the link (i, j) is denoted by µ f c (i,j) (t). In this study, the flow, f c ∈ V, has been donated by its destination f c for clarity. Due to the changes in the device's position, the device's selection to build an optimum path will be dynamically modified as well. In view of the link's route computation and link cost, the graph's optimum path will be selected to transmit the packet from the source to the destination. In order to attain optimal throughput and performance enhancement, the back-pressure strategy has been considered in this study, which is discussed extensively in the next section.

Back-Pressure Routing
The back-pressure (BP) algorithm proposed in [45] has been recognized as providing optimal throughput in time-varying networks. The BP algorithm does not perform route discovery of intermediate devices from the source to destination; instead, each packet independently develops its own routing decision by solving the maximum weight process at each time slot. There are two different levels to deliver data, the selection of the flow problem at the device level and the scheduling of links at the network level, discussed below.

Flow Selection
At the initial stage, the aim is to decide a weight for each intermediate link on (i, j) ∈ E, so that the traffic packet flows to the next forwarding operation in the optimum path. The packets from flow f c will be scheduled if flow f c achieves the maximal weight on the link (i, j). The max weight has been denoted by W f c (i,j) (t), also stated as BP, such that

Link Scheduling
In the second stage, a set of links are selected to be activated simultaneously among all non-conflicting links in the network. For each TTI (transmission time interval), the transmission rates allocated to the maximal weight of link (i, j) will be set, while the optimal commodity (data stored in a backlog queue of i node that is destined for j node) for any link will be solely transmitted. As a result, the back-pressure max weight schedule could be described as follows: For each link (i, j) ∈ E, a transmission rate µ f c (i,j) (t) is given to the corresponding flow f c , while the flow is referred to the flow selected for the maximal weight of link (i, j) during the transmission.

Device Selection Based on Packet Power Consumption Ratio with Back-Pressure Strategy
The residual battery of a device refers to the amount of charge remaining on the battery attached to the device at an instant of time, which is calculated using the linear battery model [46]. It is a power consumption-aware metric and is embedded with the MARS metric to enhance the performance of the MBMQA approach by selecting the intermediate devices which possess higher energy level during the transmission, while intermediate devices with lower energy level are avoided. The DS RB (i, j) metric enhances the packet power consumption ratio in the D2D communication-based IoT 5G network, which is calculated based on the devices' residual energy with back-pressure as follows: where RB j (t) is the residual battery of the intermediate device j, RB max j (t) denotes the maximum battery level of device j in mAh, which is configured from the battery energy model, and DR j (t) denotes the drain rate of device j in mAh per an instant of time t, which is calculated as follows: where T refers to the simulation time in a second, E total denotes the total energy consumption by devices in mWh, Q is the coulombs charge of devices in Ah and V is the voltage supply in volts.

Device Selection Based on the Stability of Network with Back-Pressure Strategy
Considering that the mobility of devices helps prevent a high-speed device from participating in the route selection procedure, this leads to the selection of a highly stable route and reduces the routing overhead. The Random Waypoint (RWP) mobility model has been utilized to calculate the devices' speed [47]. Here, we consider a factor called the mobility factor M (i,j) of a device j with respect to device i in the D2D communication-based IoT 5G network. The mobility factor is employed to categorize the devices based on their mobility, which is measured based on pause time p, speed v and direction of the mobile devices θ. The mobility of devices is based on the mobility-aware route selection introduced in [48], where if the value of the mobility factor is high, it indicates a high pause time, suitable direction and less speed. The minimum mobility factor value for selecting devices in an optimum route is known as the threshold value, which has a range from zero to one. In cases where the mobility factor value of the devices is greater or equal to the threshold value, those devices will be selected as an intermediate device between the source and destination; otherwise, the device is avoided. This device selection based on the mobility of devices, i.e., the DS mob(i,j) (t) metric, improves the network stability for the unpredictable motion of devices in the D2D communication-based IoT 5G network. The DS mob(i,j) (t) value is estimated based on the mobility of devices with maximum weight back-pressure as follows: Here, t l (1 ≤ l ≤ p) refers to the l th time interval of devices' pause state and t m is the nth (1 ≤ n ≤ m) time interval motion of devices.

Device Selection Based on Traffic Congestion Control with Back-Pressure Strategy
The queue length (QL) value describes the number of backlog packets at the device buffer. Since devices are mobile and free to move in any direction, the value of QL frequently changes in a small duration of time. The queue length of devices could be obtained from the queue length model in bytes. The devices which have a lower QL are assumed to be higher priority for selecting the optimal path. Overall, this device selection DS QL(i,j) (t) metric has been implemented for traffic congestion control based on QL in the D2D communication-based IoT 5G network using back-pressure calculated as follows: where QL j (t) denotes the number of bytes in device j, and QL max j (t) is the maximum number of the queue length size in devices.

Multiple-Attributes Route Selection Metric (MARS)
The MARS metric estimates the device selection criteria's values DS RB(i,j) (t), DS mob(i,j) (t), and DS QL(i,j) (t) continuously and independently, where the selecting of the optimal route requires a minimum threshold value of devices' lifetime. It collectively combines all the devices' selection criteria values and constructs one function, shown in Equation (8). MARS's weight will be calculated using the Attribute Hierarchy Process (AHP) technique [49] according to the user's preferences. The AHP is a well-known technique utilized to calculate the optimal weight as a multi-attribute decision-making technique that aids in setting priorities and executing the optimal decision. The MARS decision is set as follows: where W is the weight obtained by AHP among the device's selection criteria according to the user's preferences. The devices with higher MARS metric values are shortlisted for selecting an optimal path for source-destination pairs. The computation steps of the MBMQA scheme is illustrated in Algorithm 1. In order to arrange the destination, the Multipath Dijkstra algorithm has been utilized for the purpose of the route discovery process and computing the multi-path between the source and destination pair [50]. The MQA routing scheme, described with a flow chart, is presented in Figure 2.

Implementation and Validation of MBMQA
The validation stage of the MBMQA routing scheme was completed by comparing the mathematical formulas and computation of the desired settings against parameter values received. In addition, route calculation functionality of the MBMQA routing scheme was performed based on device resources (RB, Mobility, and QL). The decision of the routing metric was compared with conventional MP-OLSRv2 and MEQSA-OLSRv2 schemes. For the purpose of analysis, all the devices were implemented as mobile with variable speed. In order to demonstrate the effectiveness of the proposed scheme and avoid devices with fewer resources in the optimal path, eight devices with different resources were randomly distributed, as shown in Figure 3. Devices 1 and 8 represent the source-destination pair, and 2, 3, 4, 5, 6 and 7 are the intermediate devices with different attributes. The proposed approach selected devices 6 and 7, which appear to have sufficient resources for route selection, e.g., higher residual battery, comparatively lower mobility and supplementary free queue slots. Therefore, the proposed approach selected route 1 → 6 → 7 → 8 as an optimal route among available devices by comparing available devices. In addition, the shortest path, 1 → 2 → 3 → 8, was not selected for the optimal path due to the value of the low resources. In addition, device resource values such as RB, Mobility, and QL were monitored during the simulation running time. As a result, it can be seen that the MBMQA scheme is a strict energy, mobility, and queue length-aware routing scheme.

Simulation Models
In the execution of the MBMQA routing scheme and analysis of the performance, several models are to be discussed and the performance of each model could be evaluated. In this study, three models were utilized to estimate the value of energy consumption, mobility and lifetime of devices, and routing calculations. These models have been briefly discussed in the following sub-sections.

Algorithm 1. Route Computation for the MBMQA Algorithm
1: Source device to i, Destination device to j 2: For all entries do //source-destination pairs 3: Source device start route discovery 4: Set number of the path to E 5: Exchange HELLO and Topology Control messages 6: Gather all topology information, including devices (RB, Mobility, and QL) 7: Construct the network graph 8: If j is the destination device, then 9: Add the entry to the multi-path routing table 10: Else 11: Set the device j in the topology 12: End if 13: Add the device j to the device's map 14: For k equal to 0 to k equal to E − 1 do //all paths 15: Initiate the Multipath Dijkstra Algorithm // To evaluate the multiple paths 16: Set the max -weight to device j 17: For all devices in the device map do 18: Get the link_cost(i, fc) to the next hop devices 19: Renew the weights of devices based on the link_cost(i, fc) 20: Select the next hop device fc with minimum weight 21: Ff the address of fc = the address of j then 22: Construct the routing entry 23: Add the entry to the multi-path routing table 24: Select optimal path based on MARS metric value 25: Else 26: There is no route found 27: End if 28: Recalculate the cost of the link function 29: End for 30: End for

Mobility Model
The devices' mobility in the D2D-based IoT 5G network could be described through the position values and the devices' speed. The mobility of devices provides information regarding the varying topology and the link failure of the network. The random waypoint model (RWP) has been utilized for mobility models in the simulation of the D2D-based IoT 5G network. It selects a random destination and speed for each device from 0 to S max . The destination point was selected randomly in the network area. Thus, in order to compute the effect of devices' mobility on the proposed scheme's performance, the parameter values of the devices were considered based on mobility.

Energy Model
Energy consumption of devices plays a vital role in the D2D communication-based IoT 5G network, since devices are battery operated with limited battery energy. The device's mobility increases the energy consumption of the devices due to the increased control overhead signaling in the network. The maximum number of bits that can be transmitted is defined by the energy consumption ratio in transmitting one bit to the total available battery energy. There are four leading states of the device in the wireless network: transmission, reception, idle and sleep; each state's energy consumption is different. Thus, a Generic Energy Model [51] has been utilized to assess the energy consumption based on power consumption and time duration in each state through the equations below: E reception = P reception × t reception (10) where E transmission , E reception , E idle , and E sleep denote the energy consumption for transmission reception, idle and sleep, respectively. t transmission , t rececption , t idle , and t sleep are the time duration of the device and P transmission , P rececption , P idle , and P sleep stand for the power consumption in the states. Following the Generic Energy Model, the parameters P rececption , P idle , and P sleep are configurable according to the deployment condition, while P transmission contains the signal transmitted power, which could be calculated through the following: where P t is the power of the transmitted signal, α stands for the power amplifier coefficient, V denotes the voltage supply in volts and P CO refers as the power consumption of the signal in the entire path. For the purpose of the simulation, the power consumption of the devices in sleep and idle mode was not considered in the simulation. These modes consume a limited amount of energy as compared to when the device is transmitting or receiving any data. Therefore, the total energy consumption (E total ) of a device for transmission and reception of packets can be calculated as: where E transmission is the total energy consumed during transmission and E reception is the total energy consumed during reception. The general energy model provides parameter values such as time spent and energy consumption in various states and significantly affects the routing scheme. The MBMQA routing scheme utilizes the battery energy parameters for selecting the optimal source and destination pair route. In addition, these parameter values were used in lifetime models of devices.

Device's Lifetime Model
The battery level and energy consumption of devices depend on the device lifetime model, while longer device vitality leads to further network life. This is due to the fact that the network is connected for a specific period of time unless the battery of the paired device has been exhausted. The drain rate is dependent upon the device load, and in cases where the initial energy level of all devices is even, the first device to completely exhaust its battery will have the maximum drain rate. The lifetime of devices is calculated by the ratio of residual battery, while the drain rate of device j is described as follows: where LT j (t) denotes the lifetime of device j, RB j (t) stands for the device j residual battery and DR j (t) is the drain rate of device j at a time instant t which is calculated in Equation (5).
If the value of the drain rate is zero, then the lifetime of the device is considered to be a maximum value. Extending the individual device lifetime will ensure that the whole network lifetime is prolonged. In addition, the lifetime of the device depends upon the drain rate and battery level; therefore, the proposed scheme considers the device's lifetime to measure the battery level and drain rate. Therefore, the device will have the longest lifetime with the highest battery energy level and lowest drain rate.

Simulation Setup
The developed MBMQA routing protocol was implemented, and comprehensive simulations were conducted to evaluate the performance of MBMQA along with the MEQSA-OLSRv2 and MP-OLSRv2 routing scheme in various scenarios. A simulation environment was established to investigate the performance of the proposed MBMQA scheme and obtain the multi-path routing conditions. The simulation was performed using network topology with 49 devices deployed over a network area of 1000 m × 1000 m. Therefore, there were many multi-hop and neighboring devices with different resources in the proposed network topology. For the purpose of simulating the linear battery model, the monitoring interval of the battery energy level was set to one second and all the devices possessed an equal initial battery energy level of 10 mAh. The devices exhausted their battery during the conveying of data packets and eventually shut off due to a critically low battery level. A special set of eight source-destination joints were carefully selected, including mid-devices on each side of the four corner nodes, so that multiple paths could be achieved through an adequate number of intermediate devices. The constant bit rate (CBR) of 20 packets/s generates a 512 byte packet size in the network. The data transfer started after 15 s of the simulation, and enough time was spent exchanging routing messages. IEEE 802.11b wireless radio was utilized in the simulation with an 11 Mbps data rate, 2.4 GHz channel frequency, and 270 m radio transmission range. All results were obtained at an average of 10 s of simulation time with different initial topologies in order to obtain a total simulation time of 200 s. The simulation parameters employed in the simulation have been summarized in Table 1.

Performance Evaluation Parameters
In order to evaluate the performance of the proposed MBMQA routing scheme, the following performance evaluation metrics are carried out through extensive simulation.

1.
Throughput: The total number of bytes can be successfully received at the destination for a specific duration of time. It is expressed in Kbps and can be defined as: where t f is the time of the first packet received, and t represents either the time of the last packet received if the session is complete, or the simulation time if the session is incomplete, where the times are in seconds; 2.
Packet delivery ratio (PDR). This refers to the ratio between the number of data packets that were effectively received at the destination device and the number of data packets transmitted from the source device during the simulation time.
where N PR is the number of received packets at the destination device and N PS is the number of packets that were sent from the source device; 3.
Average end-to-end delay. This refers to the average time it takes to traverse the network. In other words, it is the time taken by a packet from the source to destination device, which is measured in seconds. Therefore, it includes all delays in the network, such as queueing delays, retransmission delays, and buffering delays, that are induced in routing time; 4.
Packet Drop. This is the number of the packets which were received at the destination device.
where N PD is defined as the number of packets dropped throughout the simulation time, N PS is the number of data packets transmitted by the source device, and N PR denotes the number of data packets successfully delivered to the destination device; 5.
Average Energy Consumption (Avg.E consume ). This refers to the average energy consumption of all devices during the simulation time in mAh. The device's energy consumption varies with respect to the device's state, such as transmission, reception, sleep and idle. The total average energy consumption (Avg.E consume ) of device j is calculated as follows: Avg.E consume = 1 n n ∑ j=1 E total (j) (19) where n refers as the total number of devices in the network; 6.
Energy Cost per Packet (E cos t ). This is defined as the ratio between the average energy consumption by the network devices and the total number of data packets successfully received at the destination. The E cos t can be calculated as below:

Simulation Results and Discussions
This section presents the results obtained from extensive simulations. These results have been compared with MEQSA-OLSRv2 and MP-OLSRv2 routing schemes. Furthermore, the effectiveness of the proposed MBMQA routing scheme has been assessed with a mobility awareness evaluation study in the D2D communication-based IoT 5G network. In addition, the RWP model was employed at the maximum achievable speed of devices, which varied between 10 m/s and 60 m/s. Figure 4 illustrates the throughput of the MBMQA approach with respect to the speed of devices. The obtained results indicated that the proposed approach has outperformed the other approaches. It can be observed from the figure that the overall throughput with all the stated schemes slightly reduced through an increase in the speed of the nodes. This is attributed to the increase in the difficulty of finding a stable route in cases where the node speed is high. The superiority of the proposed MBMQA scheme as compared to both MP-OLSRv2 and MEQSA-OLSRv2 lies in the back-pressure algorithm employed, which does not solely rely on the speed and battery levels of the nodes when making routing decisions but caters to the queue length of packets (commodities) as well in order to be processed by each node. The incorrect selection of nodes based solely on the speed and battery level will force the nodes to be part of the route, which results in higher queue length, and nodes will constantly discard the packets when the queue length is full. Avoiding devices with higher queue lengths reduces network traffic, as the load is equally distributed among the devices. Therefore, only nodes with low queue lengths are selected to forward data. This distinction provides leverage to the proposed protocol and enhances throughput compared to both MP-OLSRv2 and MEQSA-OLSRv2. Furthermore, the MBMQA scheme proved to be more stable than its counterparts due to its optimized approach in the selection of multiple relays and avoiding high mobility nodes. Figure 5 illustrates that the proposed approach possesses consistent low delay values compared to other schemes with respect to the device's speed. End-to-end delay is when a packet is required to reach its destination comprising several nodes taking part in the route. Each packet must wait in a queue of the nodes for a specific time until the node starts processing the packet and propagates towards the next node in the selected path. Queuing delay is a significant part of the overall delay in situations where the congestion on the network is high and nodes in the system are operating at their full queue length capacity.

Delay Comparison
In this condition, the selection of nodes based on their queue length is more important than the mobility and battery level of the nodes. The stated schemes (MP-OLSRv2 and MEQSA-OLSRv2) do not base their forwarding decision on the queue length and relay, which leads to the generation of multiple paths toward the destination and does not positively affect the delay comparison, as some packets would be trapped in the network on nodes with larger queue length. Until they are processed in the queue or they are resent by the source node, they tend to increase the amount of time to be delivered to the destination. The delay performance achieved by the MBMQA scheme is 33% lower as compared to MP-OLSRv2 and 19% lower as compared to MEQSA-OLSRv2, which is obtained at the maximum device speed of 60 m/s. Moreover, MEQSA-OLSRv2 exhibited better performance with respect to MP-OLSRv2 as a result of analyzing the battery level of the nodes and its effect on the forwarding path. Nodes with a low amount of battery will eventually be exhausted and will lose the existing packets in the queue of the nodes. These packets need to be re-transmitted by the source nodes, which increases the overall time of the process.

Packet Delivery Ratio Comparison
It can be seen from Figure 6 that the MBMQA scheme ensures a high packet delivery ratio (PDR) value over both MP-OLSRv2 and MEQSA-OLSRv2 schemes. This is due to the fact that MBMQA takes advantage of the MARS metric to select devices with a lower energy drain rate and an adequate amount of remaining energy level. Consequently, a reduced amount of retransmission is required to transfer packets from the source to the destination and avoid selecting low-resource devices. In addition, packet delivery is closely related to packets dropped by either low energy level nodes or packets dropped due to the full queue of nodes participating in multiple forwarding of packets. Therefore, the proposed scheme is shown to provide optimum results in delivering packets to the destination, since a limited number of packets dropped. Moreover, as the speed of devices increases, maintaining connections with neighboring nodes becomes difficult, while that is the next hop for data forwarding. Furthermore, in order to forward packets to the next hop, the device needs to select another candidate for the successful transmission of the packet while fulfilling the requirements of the MARS metric. Based on the results obtained, the MBMQA scheme delivered approximately 30% more packets than MP-OLSRv2 and approximately 15% to 20% more than MEQSA-OLSRv2.

Packet Drop Comparison
The results illustrated in Figure 7 indicate that the MBMQA possesses the lowest packet drop percentage compared to the other schemes (i.e., 55% lower than MP-OLSRv2 and 35% lower compared to MEQSA-OLSRv2) at the 60 m/s speed of the device. The higher number of packets dropped in other schemes is due to the absence of the backlog queue length awareness of devices for selecting the best route. In contrast, the MBMQA routing scheme intelligently selects devices with a lower queue length to reduce the chance of traffic overhead and packet drop.

Energy Cost per Packet Comparison (ECP)
The results concerning the effect of altering the speed of devices with the ECP are presented in Figure 8. It can be observed that the ECP of both MP-OLSRv2 and MEQSA-OLSRv2 increased as the node speed increased such that it, at a device speed of up to 40 m/s, it is approximately 1.8 and 1.3 times more in MP-OLSRv2 and MEQSA-OLSRv2, respectively. As defined previously, this is attributed to the fact that MBMQA selects the suitable path for source-to-destination pairs while considering devices' energy and queue length based on the MARS metric. This increases the packet delivery ratio and creates fewer packet drops. Since there are minimal packet drops and retransmission, extra energy is saved by transmitting most packets only once. Therefore, energy consumption during packet transmission is reduced. Furthermore, the exploiting energy and QoS awareness techniques enable MBMQA to transmit more data packets with lower energy consumption, thus reducing the ECP.

Average Energy Consumption Comparisons
Similarly, the overall power or energy consumed by the network is minimized, as low power is required to transmit a single bit from source to destination, as depicted in Figure 9. Furthermore, BP reduced load congestion occurring in the path and further reduced the device drain rate. As the device speed increases, the energy consumption of devices increases. Energy consumption increases from approximately 56.43 mAh to 57.42 mAh for MP-OLSRv2, from 56.18 mAh to 57.13 mAh for MEQSA-OLSRv2, and from 55.86 mAh to 56.62 mAh for MBMQA routing schemes when device speed increases from 10 m/s to 60 m/s. As seen from Figure 9, it can be observed that MBMQA can consume less battery energy compared to MP-OLSRv2 and MEQSA-OLSRv2 in all device speed scenarios because the source device forwards traffic flow towards intermediate devices which have the highest energy level and lowest drain rate.

Conclusions
This study presents a multi-path hybrid MBMQA routing scheme with a back-pressure algorithm strategy for the IoT 5G network based on D2D communication. The proposed routing scheme consists of multiple parameters, including energy consumption, queue length size, and mobility of the devices. In order to determine the optimal paths that provide maximum network performance, back-pressure forwards data packets toward the devices with low queue backlogs while maintaining network stability. The MBMQA routing scheme ensures that multiple stable routes can be formed from source to destination without over-exhausting any single device's battery by enhancing the conventional routing schemes. Moreover, the MARS decision metric is utilized to evaluate the device selection criterion in an optimal route based on mobility, battery, and queue length size of the devices. Simulation results indicated that MBMQA outperforms its MEQSA-OLSRv2 and MP-OLSRv2 counterparts in terms of packet delivery ratio, average end-to-end delay, throughput, packet drop, energy consumption, and energy cost, especially for high mobility scenarios. In addition, the MBMQA scheme mitigated the number of dropped packets and delivered a higher number of data packets at a lower energy cost per packet, which resulted in higher energy efficiency. In the future, with the help of the resource allocation method, a higher system data rate can be achieved, along with the security aspects. Therefore, D2D communication is one of the critical technologies in the 5G network, and further research in the heterogeneous network domain is imperative.