# 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  
In the majority of cases, when the user's service is in the initial buffering state, it means that it is in the buffering state at the beginning of the video playback. After initial buffering, the user terminal starts playing the streaming media. To ensure that the user's service does not rebuffer after entering the playback state, power constraints similar to those in the previous handover section need to be met, i.e., an average channel capacity limit and a limit to prevent buffer exhaustion. Typically, the initial buffering time of the video platform is very short. In order to avoid rebuffering soon after the end of buffering, it should be ensured that the channel capacity is not less than the user's video bitrate \(R_{v}\) at this time and the satellite is in the rising period after buffering is over. When the power of a user link satisfies this constraint, it also satisfies the power limit for the average channel capacity. Therefore, only the power limit after the initial loading is completed needs to be considered in the initial buffering state. Figure 6: Structure of the algorithm for minimum power \(P_{Rv2}\) satisfying the second condition. In order to calculate the minimum power \(P_{Rv}\) meeting the above conditions, we need to use the approximate scheme of Equation (17). Similar to the handover environment, the user \(u_{i}\) starts accessing at time \(t_{acc}\) and the playback threshold of the initial buffering is known to be \(T_{b}\) seconds, which means that the video client must load a video of the length of \(T_{b}\) seconds before it can start playing. Thus, the power limit satisfies the following Equation (25):  
\[C(t_{acc}+T_{b},P)\geq Rv \tag{25}\]  
Using the same approximation scheme as in Equation (17), we preset a reference power \(P_{0}\) and substitute it into Equation (6) to calculate the reference channel capacity \(C_{0}=C(t_{acc}+t_{b},P_{0})\) after \(t_{b}\) seconds. Through Equation (25), we determine the minimum required channel capacity \(C_{Rv}=R_{v}\). These values are then substituted into Equation (17) to compute the minimum power \(P_{Rv}\) satisfying the condition. Finally, analogous to the iterative estimation of \(P_{Rv1}\) in Section 3.1, we perform several iterations to estimate \(P_{Rv}\), bringing it closer to the true minimum power that strictly satisfies Equation (25). Next, calculate the loss function \(\gamma_{Deg}\) of the initial buffer. It is known that the current satellite residual power load is \(P_{re}\), and when \(P_{re}\geq P_{Rv}\), it means that the current satellite meets the minimum user demand. In other word, the limit of user link power is \(P_{i,j}\in[P_{Rv},P_{re}]\). If \(P_{re}<P_{Rv}\), this indicates that the current satellite cannot meet the user's QoE demand, which is no rebuffering. To obtain the initial loading function \(\gamma_{Deg}\), we refer to Equation (3) and rewrite it in a normalized way. When the user's initial buffering time is less than 4.29 s, the user will have no QoE loss during the initial buffering phase. \(\gamma_{Deg}\) can be derived at different powers \(P_{i,j}\in[P_{Rv},P_{re}]\). If \(P_{re}<P_{Rv}\) corresponding to different buffer times \(t_{i,j}\in[t_{re},t_{Rv}]\). After initial loading, we hope that the user can fill the buffer as much as possible to provide redundancy and resist channel instability. Therefore, in this paper, when the satellite is at maximum elevation, the data-filling amount of the user buffer is set as a reward function \(\gamma_{Buff}\). Knowing that the maximum buffer capacity of the user terminal is \(H_{buff}\), the minimum amount of data input required to just fill the buffer with streaming data when the satellite reaches the maximum elevation angle \(\theta_{max}\) is \(H_{sum}(P_{Buff})\).