## 3 Proposed Approach
Initialize particles:  For \(k\) = 1 to \(K\): \(d_{k}^{(0)}\sim\mathcal{U}(d_{min},d_{max})\) 2. Predict particle states: \(d_{k}^{(t+1)}=d_{k}^{(t)}+v_{j}\cdot\Delta t+\xi_{k}\) 3. Update weights:  For \(k\) = 1 to \(K\): \(w_{k}^{(t+1)}=\frac{\exp\left(-\frac{\left(RSSI_{\text{measured}}-RSSI_{k}^{(t+ 1)}\right)^{2}}{2\sigma^{2}}\right)}{\sum_{j=1}^{K}\exp\left(-\frac{\left(RSSI_ {\text{measured}}-RSSI_{j}^{(t+1)}\right)^{2}}{2\sigma^{2}}\right)}.\) 4. Resample particles based on weights. 5. Estimate distance: \(\widehat{d}_{i,j}(t)=\sum_{k=1}^{K}w_{k}^{(t)}d_{k}^{(t)}\) for \(k\) = 1 to \(K\) B. Evaluate Handover Conditions: If UE is at the edge of the current satellite's coverage area:  Calculate \(RSSI_{target}\) and \(RSSI_{current}\). If (\(RSSI_{target}-RSSI_{current}>H\)):  Start \(TTT\) timer. If (Condition holds for \(TTT\) seconds):  Perform handover and update state. Else:  Stay in the current cell. C. Reinforcement Learning Policy Update: 1. Observe state: \(S(t)\) = {\(\hat{d}\), \(RSSI\), UE position, velocity}. 2. Select action \(A(t)\) = [hysteresis, \(TTT\)] using policy \(\pi_{\theta}\) (\(\text{A}\,|\,S\)). 3. Compute cumulative reward: \(G(t)=\sum\limits_{k=0}^{\infty}\gamma^{k}R(t+k)\) 4. Update policy parameters: \(\theta\) \(\leftarrow\)\(\theta+\alpha\
abla_{\theta}E[G]\) Return optimized hysteresis (\(H\)), \(TTT\), and final handover decisions. ```  
**Algorithm 2** LBH-PRL Algorithm
Handover mechanisms in NTN typically rely on parameters like hysteresis and _TTT_, which are often configured statically. These static configurations are unable to adapt to the constantly changing network conditions, resulting in the following issues:  
* Handover failures: Frequent or poorly timed handovers can lead to connection drops. * Ping-pong effects: UEs may oscillate between satellites within a short time, leading to inefficient resource utilization. * Performance degradation: The suitable parameter settings can result in reduced throughput and increased latency. Moreover, accurately estimating the distance between UE and satellites, which is a critical element for location-based handovers, is challenging due to factors such as multipath effects and interference. Satellite motion:  
Assume \(N\) LEO satellites, each moving at a constant orbital velocity \(v_{\rm s}\). The position of satellite \(i\) at time \(t\) is represented as:  
\[{\rm s}_{i}(t)=(x_{i}(t),y_{i}(t),z_{i}(t)) \tag{2}\]  
where the following apply:  
\({\rm s}_{i}(t)\): Position vector of satellite \(i\) at time \(t\). \(x_{i}(t),y_{i}(t),z_{i}(t)\): Cartesian coordinates of satellite \(i\) at time \(t\). UE motion:  
The position of UE \(j\) at time \(t\) is represented as follows:  
\[p_{j}(t)=\big{(}x_{j}(t),y_{j}(t),z_{j}(t)\big{)} \tag{3}\]  
\(p_{j}(t)\): position vector of UE \(j\) at time \(t\)  
\(x_{j}(t),y_{j}(t),z_{j}(t)\): Cartesian coordinates of UE \(j\) at time \(t\). The distance between UE \(j\) and satellite \(i\) is given by:  
\[d_{i,j}(t)=\|{\rm s}_{i}(t)-p_{j}(t)\| \tag{4}\]  
where the following apply:  
\(\parallel\): Euclidean norm. Signal Model:  
The received signal strength indicator (\(RSSI\)) from satellite \(i\) to UE \(j\) is as follows:  
\[RSSI_{i,j}(t)=P_{t}-20\log_{10}\big{(}d_{i,j}(t)\big{)}+\eta, \tag{5}\]  
where the following apply:  
\(RSSI_{i,j}(t)\): Signal strength received by UE j from satellite \(i\) at time \(t\). \(P_{t}\): Transmit power of the satellite. \(d_{i,j}(t)\): Distance between UE \(j\) and satellite \(i\) at time \(t\). \(\eta\): Gaussian noise. Particle filter for distance estimation:  
Particle filtering is employed to estimate the distance \(d_{i,j}(t)\) based on \(RSSI\) measurements. Particle initialization:  
Initialize \(K\) particles with distances sampled from a uniform distribution:  
\[d_{k}^{(0)}\sim\mathcal{U}(d_{\rm min},d_{\rm max}) \tag{6}\]  
where the following apply:\(d_{k}^{(0)}\): Initial distance of particle \(k\). \(\mathcal{U}\): Uniform distribution over \([d_{\min},d_{\max}]\).