# Handover Scheme in LEO Satellite Networks Based on QoE for Streaming Media Services
## 3 Simulation System Design for Handover and Access of Streaming
### Access Scheme Design Based on Streaming Services
It shown as Equation (26) below:  
\[H_{buff}+R_{v}\cdot(t_{\max}-t_{acc})=H_{sum}(P_{Buff})=\int_{t_{acc}}^{t_{ \max}}C(t,P_{Buff}) \tag{26}\]  
\(t_{max}\) is the time at which the satellite reaches its maximum elevation angle, and tmax can be calculated [23]. \(P_{Buff}\) can be calculated by the approximate scheme of Equation (17). We then set the handover threshold \(H_{Thre}\) to the amount of streaming data in the buffer corresponding to a reward function of 0 at the time \(t_{max}\). In other words, the reward function is 0 when the user power \(P_{i,j}\) satisfies that the buffer at the user terminal is just filled to the handover threshold \(H_{Thre}\) at the time \(t_{max}\). It shown as Equation (27) below:  
\[H_{Thre}+R_{v}\cdot(t_{\max}-t_{acc})=H_{sum}(P_{TInre})=\int_{t_{acc}}^{t_{ \max}}C(t,P_{Thre}) \tag{27}\]  
\(P_{Thre}\) can also be calculated by the approximate scheme of Equation (17). Thus, \(\gamma_{Buff}\), the reward function of terminal buffer data volume when the satellite moves to the position of the maximum elevation angle, is  
\[\gamma_{Buff}=\min(\frac{P_{i,j}-P_{Thre}}{P_{Buff}-P_{Thre}},1) \tag{28}\]\(\gamma_{Buff}\) uses \(P_{Buff}\) to normalize the user's power \(P_{i,j}\). As shown in Equation (28), the reward function value is \(1\) when \(P_{i,j}\geq P_{Buff}\), which means that the user's reward function does not increase with power when the power is too high. This is because the buffer will discard newly received streaming packets due to overflow. When \(P_{i,j}<P_{Titre}\), the reward function value is negative. This means that the current power is too low, causing the channel capacity to be too low, so that when the satellite reaches its highest point, the amount of streaming data in the user's buffer is still below the threshold that triggers the handover. Equation (29) is the problem formulation for the access scheme:  
\[ \begin{split} CAcc_{i,j}(P_{i,j},S_{i,j})=\beta_{1}\gamma_{Buff}- \beta_{2}\gamma_{Pow}-\beta_{3}\gamma_{Ch}-\beta_{4}\gamma_{Deg}\\ \left\{\begin{array}{c}\gamma_{Pow}=\frac{P_{Li}/P_{Dec_{i,j}} }{P_{Titre}}\quad\gamma_{Pow}\leq 1\\ \gamma_{Ch}=\frac{1+C_{Dec_{i,j}}}{C_{Titre}}\quad\gamma_{Ch}\leq 1\\ \gamma_{Deg}=\frac{\max(\min(0.29\%\frac{1+C_{Dec_{i,j}}}{C_{Titre}})+\gamma _{Ch}))}{4}\quad t_{i,j}>4.29\\ \gamma_{Buff}=\min(\frac{P_{i,j}-P_{Titre}}{P_{Buff}-P_{Titre}},1)\\ P_{i,j}\in[P_{Buff},P_{ne}]\end{array}\right.,\end{split}  \tag{29}\]  
where \(CAcc_{i,j}(P_{i,j},S_{i,j})\) is the utility function when the user ui accesses the satellite \(S_{i,j}\) with the power \(P_{i,j}\) at the handover. \(\gamma_{Pow}\) and \(\gamma_{Ch}\) have the same meanings as in Equation (24). \(\gamma_{Deg}\) is the loss function at the user's initial buffering. \(\gamma_{Buff}\) is the reward function of terminal buffer data volume when the satellite reaches the position of the maximum elevation angle; \(P_{buf}\) is the power required for the data to exactly fill the buffer, and \(P_{Titre}\) is the power required to buffer data up to \(H_{Titre}\), which is the threshold value of the remaining data in the buffer that triggers handover when the satellite descends. \(\beta_{1}\), \(\beta_{2}\), \(\beta_{3}\) and \(\beta_{4}\) are the respective weighting coefficients. In this paper, we set \(\beta_{1}=\beta_{2}=\beta_{3}=\beta_{4}=1\). The user \(u_{i}\) traverses all the satellites of the set \(S_{i}\) and then selects the satellite with the largest utility function among them to access.