# User QoS-Based Optimized Handover Algorithm for Wireless Networks
## 3 User QoS-Based Optimized Handover Algorithm
### Optimized Handover Algorithm with QoS Requirements (OHAQR)
The definition of the Q-handover score (\(Q\)) is as follows:  
\[Q=W_{TP}\times TP_{s}+W_{PL}\times PL_{s}+W_{AT}\times AT_{s}+W_{RSSI}\times RSSI _{s} \tag{2}\]  
\[TP_{s}=\frac{TP^{\text{C}}-TP^{Min}}{TP^{Max}-TP^{Min}} \tag{3}\]  
\[PL_{s}=1-\frac{PL^{\text{C}}-PL^{Min}}{PL^{Max}-PL^{Min}} \tag{4}\]  
\[AT_{s}=\frac{AT^{\text{C}}-AT^{Min}}{AT^{Max}-AT^{Min}} \tag{5}\]  
\[RSSI_{s}=1-\frac{RSSI^{\text{C}}-RSSI^{Min}}{RSSI^{Max}-RSSI^{Min}} \tag{6}\]  
\[W_{TP}+W_{PL}+W_{AT}+W_{RSSI}=1 \tag{7}\]  
where \(W\) represents the weight; \(W_{TP}\), \(W_{PL}\), \(W_{AT}\), and \(W_{RSSI}\) represent the weights of throughput, packet loss rate, application type, and received signal strength gain, respectively; \(TP\) represents the throughput; and \(TP^{\text{C}}\), \(TP^{Min}\), and \(TP^{Max}\) are the current, minimum, and maximum throughputs, respectively. Throughput is set between 0 and 150 Mbps. _PL_ represents the packet loss rate, and \(PL^{\text{C}}\), \(PL^{Min}\), and \(PL^{Max}\) are the current, minimum, and maximum packet loss rates, respectively. The packet loss rate can be set from 0 to 100%. _AT_  
Figure 3: Schematic diagram of the operation of the optimized handover algorithm based on user QoS requirements. represents the application types, and \(AT\)', \(AT\)', \(AT\)', and \(AT\)''' are the current, minimum, and maximum application types, respectively. The application types can be set from 1 to 10. The application type is used to indicate the priority level of the application service, and its value is 1-10: 1 indicates the lowest priority and 10 indicates the highest priority. \(RSSI\) represents the received signal strength indicator, and \(RSSF\), \(RSSI\)', and \(RSSI\)''' are the current, minimum, and maximum interference received signal strength indicators, respectively. The received signal strength indicator is expressed as the sum of all surrounding receivable signal strengths. Suppose \(RSSI\)'' is -90 dBm and \(RSSI\)''' is \(-1\) dBm. The proposed OHAQR is to add a QoS evaluation mechanism in the OHA to measure whether to perform the handover procedure. Since the calculation complexity of OHA is \(O(n)\), and the evaluation and judgment of QoS includes the QoS calculation of at most \(n\) APs, the calculation complexity is \(O(n)\). Since QoS calculation is required for each handover judgment, the overall computational complexity of the OHAQR algorithm is \(O(n^{2})\). ```
1:Function HAND-OFF TRIGGERING
2:if(\(RSSI\)\({}^{2 nd\_best}\geq T\)) then
3:if(\(RSSI\)\({}^{2 nd\_best}\geq T\)\({}^{2 nd\_best}-HM\)\({}^{2 nd\_best}\)) AND (UE is moving toward \(RSSI\)\({}^{2 nd\_best}\) AP) then
4:return True
5:elseif(\(RSSI\)\({}^{Max}\geq RSSI\)\({}^{C}\)\(+\)\(HM\)\({}^{Goad}\)) AND (\(T\)\({}^{S\_HO}\geq RSSI\)\({}^{C}\)\(+\)\(HM\)\({}^{S\_HO}\)) AND (\(RSSI\)\({}^{Max}\geq RSSI\)\({}^{2 nd\_best}\)\(+\)\(HM\)\({}^{2 nd\_best}\)) AND (UE is moving toward \(RSSI\)\({}^{Max}\) AP) then
6:return True
7:endif
8:else
9:if(\(RSSI\)\({}^{2 nd\_best}\geq T\)\({}^{2 nd\_best}-HM\)\({}^{2 nd\_best}\)) AND (UE is moving toward \(RSSI\)\({}^{2 nd\_best}\) AP) then
10:return True
11:elseif(\(RSSI\)\({}^{Max}\geq RSSI\)\({}^{C}\)\(+\)\(HM\)\({}^{Bad}\)) AND (\(T\)\({}^{S\_HO}\geq RSSI\)\({}^{C}\)\(+\)\(HM\)\({}^{S\_HO}\)) AND (\(RSSI\)\({}^{Max}\geq RSSI\)\({}^{2 nd\_best}\)\(+\)\(HM\)\({}^{2 nd\_best}\)) AND (UE is moving toward \(RSSI\)\({}^{Max}\) AP)] OR (\(Q\)\(<\)\(T\)\({}^{QoS}\))
12:OR (\(T\)\({}^{QoS}\))
13:endif
14:endif
15:return False
16:endfunction
```  
**Algorithm 2** Optimized Handover Algorithm with QoS Requirements