# Adaptive QoS-Aware Multi-Metrics Gateway Selection Scheme for Heterogenous Vehicular Network +
## 3 Adaptive QoS-Aware Multi-Metrics Gateway Selection Scheme
### Interest Vehicle LTE-eNB Selection Process  
As mentioned above, the LTE-eNB periodically broadcasts its presence to all vehicles inside its cell. Apart from other parameters, the broadcast message will be contained in the \(RL_{eNB}\). The LTE-eNB computes the \(RL_{eNB}\) depending on the amount of traffic received from the vehicles. Suppose that a single LTE-eNB can accommodate a given \(N_{maxNB}\) maximum number of vehicles for the given bandwidth of \(B_{eNB}\). The LTE-eNB needs to compute the \(RL_{eNB}\) (in Megabits per second) using Equation (1). Moreover, the IV is expected to sense several LTE-eNBs in the premises using the difference in \(RL_{eNB}\). However, for the IV to decide which LTE-eNB to connect to, the IV needs to measure the \(RSS_{IV}\) of each sensed LTE-eNB. For the \(RSS_{IV}\) computation, Equations (2) and (3) are used, depending on whether the vehicle is moving towards or away from the LTE-eNB. In general, the \(RSS_{IV}\) depends on the vehicle's moving direction and speed. If the vehicle is moving in the direction of LTE-eNB, its \(RSS_{IV}\) increases (+). Conversely, if it is moving away from the LTE-eNB, its \(RSS_{IV}\) decreases (\(-\)). The increasing and decreasing amount of \(RSS_{IV}\) relies upon the speed of the vehicle moving towards or away from the LTE-eNB [35; 45].  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**QCI** & **Application Type** & **Carrier Type** & **Priority** & **Average Delay** \\ \hline
1 & VoIP & Guaranteed Bit Rate (GBR) & 2 & 100 ms \\
6 & FTP & Non-Guaranteed Bit Rate & 6 & 300 ms \\  & & (Non-GBR) & \\ \hline \hline \end{tabular}
\end{table}
Table 2: The QoS class identifier (QCI) for different applications.  
Figure 2: The AQAGS scheme.  
Using Algorithm 1, the IV forms a set of LTE-eNBs in which their \(RSS_{eNB}\) is greater than the predefined threshold \(RSS_{th}\). For all members of the LTE-eNBs, the IV chooses the LTE-eNB with the highest \(RL_{eNB}\). If the \(RL_{eNB}\) of the chosen LTE-eNB is greater than the \(RL_{eNBth}\), the IV directly sends both NDT and DT traffic to that LTE-eNB without defining an MGW. However, if the \(RL_{eNB}\) of the chosen eNB is smaller than the \(RL_{eNBth}\),, only the NDT applications will be transmitted directly to the LTE-eNB. This will assure that the delay requirement of this type of application is maintained. For DT applications, however, the IV will initiate the proposed multi-metrics gateway selection algorithm (Algorithm 2) to choose the best MGW for communication with the LTE-eNB.  
\[RL_{eNB}=B_{eNB}-\sum_{v=1}^{n}AR_{v}PS_{v}-b_{eNB} \tag{1}\]  
where \(b_{eNB}\) is the constant value that prevents the eNB from being overloaded, and \(PS_{v}\) and \(AR_{v}\) are the average packet size and average packet arrival rate from the vehicle \(v\) to the eNB, respectively.  
\[RSS_{IVt}\ =RSS_{IVt-1}\pm\delta \tag{2}\]  
where \(RSS_{IVt}\) and \(RSS_{IVt-1}\) signify the estimations of the LTE-eNB receive signal strength at time \(t\) and \(t\)-1, respectively. \(\delta\) represents the variety in the LTE-eNB signal strength by relating the variety in the vehicle mobility speed. \(\delta\) is computed as follows.  
\[\delta=\left(1+e^{-\frac{|v-v_{t-1}|}{\tau}}\right) \tag{3}\]  
where \(v_{t}\) and \(v_{t-1}\) represent the speed of the vehicle at time \(t\) and \(t\)-1, respectively. The constant \(\tau\) represents the rate of variation in the LTE-eNB signal strength with the moving direction of the vehicle.  
```
1:IV activates its LTE interface to communicate with eNB's
2:IV detects several numbers of eNBs with different load capacity and RSS
3:for each eNB\(\rightarrow\)\(1\) to \(n\) do
4:if (\(RSS_{eNB}>RSS_{th}\)) then
5:Acquire the \(RL_{eNBi}\)
6:endif
7:endfor
8:eNB\(=\underset{i\in[1,\epsilon]}{\max}\{RL_{eNBi}\}\)
9:if (\(RL(eNB)>RL_{eNBth}\)) then
10:The IV sends NDT and DT traffics directly to the selected LTE-eNB
11:else
12:if (NDT traffics)
13:IV connects directly to LTE-eNB
14:else
15:Call algorithm 2
16:endif
17:endif
```  
**Algorithm 1** IV eNB selection