# An Improved Routing Approach for Enhancing QoS Performance for D2D Communication in B5G Networks
## 3 System Model
### Link Quality Evaluation of Relay Devices  
An optimal path selection that guarantees the successful and efficient data transmission routing mainly depends upon the link quality status of the relay devices between the source and destination. An Expected Number of Transmissions (ETX) evaluates the link quality status of relay devices, which is the number of transmissions and retransmissions required for the successful delivery of data packets over the dedicated link to the destination device [39; 40]. Meanwhile, link failure occurs among relay devices in the established path owing to frequent changes in the network topology. Because of this, topological packets increase in the network in order to find a new path. It induces a storm of route request (RREQ) packets in the network, which significantly degrades the overall network performance. Hence, the main objective of the ETX metric is to minimize the flooding of RREQ packets during the route discovery procedure. With these factors, the packet delivery ratio and the window size of the packets \(w\) (window size is set to be ten times the probe message interval) are utilized where the size of the window time scale is equally discretized \([t_{n-1},\ t_{n}]\). The data packets delivered and received over the dedicated link through the relay device c is defined as \(\lambda_{c}\) and \(\mu_{c}\), respectively, and their values are evaluated through the probe message sent prior to the data packet transmission. Every device broadcasts the probe message to its neighbor's device for an interval of \(\xi\) seconds, i.e., \(w>\xi\), and the neighbor's device records the number of received probe message, i.e., \(n_{w}\), for a period of \(w\) second. Thus, the probability of successful data packet delivery by the source device to its neighbor's device is computed as follows:  
\[\lambda_{c}=\frac{n_{w}}{w/\xi} \tag{7}\]  
Moreover, the data packet transmission probability of the relay device c from at least one of its parent devices is \(p_{r}=1-\prod_{c>a}\left(1-\mu_{a}(t_{n})\lambda_{c}(t_{n})\right)\). Similarly, the data packet transmission probability from the relay device c to at least one of its child devices is \(p_{d}=1-\prod_{b>c}\left(1-\mu_{c}(t_{n})\lambda_{b}(t_{n})\right)\). Therefore, the \(ETX\) required to deliver data packet transmission by the device c at a time interval n is calculated as follows:  
\[ETX=\frac{d_{(a,b)}}{(1-\prod_{C>a}\left(1-\mu_{a}(t_{n})\lambda_{c}(t_{n}) \right))(1-\prod_{b>c}\left(1-\mu_{c}(t_{n})\lambda_{b}(t_{n})\right))}\frac{S} {B},t\in[t_{n},t_{n+1}] \tag{8}\]  
Here, \(d_{(a,b)}\) refers to the distance between devices \(a\) and \(b\); S defines as the size of the data packets; and \(B\) refers to the data packet transmission rate. Based on the information attached to the probe messages, each device evaluates the forward and reverse delivery ratios denoted as \(p_{d}(t_{n})\) and \(p_{r}(t_{n})\), at the previous time slot of the window, i.e., \(w_{n-1}\), providing \(r(t_{n})=Count(t_{n-1},t_{n})/\left(w/\xi\right)\). Here, \(Count(t_{n-1},t_{n})\) defines the number of probe messages received at the window, whereas \(w(t_{n}-t_{n-1}=w_{n-1}=w)\) and \(w/\xi\) refer to the summation of transmitted probe messages. Therefore, the link quality estimation based on the \(ETX\) value among the devices minimizes the link failure probability owing to the flooding impact of the RREQ messages in the network.