# Adaptive Access Selection Algorithm for Large-Scale Satellite Networks Based on Dynamic Domain
## 2 System Model and Problem Definition
### Problem Definition  
ES needs to determine the communication domain before sending packets. According to the minimum elevation angle of ES, the maximum communication distance of ES is calculated as:  
\[D_{\text{max}}=\sqrt{\left(R+H\right)^{2}+R^{2}-2(R+H)R\cos(\alpha)} \tag{1}\]  
\[\alpha=90^{o}-\sigma-\arcsin\Bigl{(}\frac{R}{R+H}\sin(R+H)\Bigr{)},\]  
where \(R\) is the radius of the Earth, \(H\) is the distance from the satellite to the ground, \(\sigma\) is the minimum elevation of ES, and \(\alpha\) is a temporary variable. The meaning of parameters in Equation (1) is shown in Figure 3.  
ES can predict the position of the satellites in real-time according to the orbital elements [25]. The latitude and longitude of \(S_{n,m}^{L}\) at time \(t\) are defined as \(LOC_{L,n,m}^{t}\):  
\[ \begin{split} LOC_{L,n,m}^{t}=\Bigl{[}LON_{L,n,m}^{t},LAT_{L,n,m} ^{t}\Bigr{]}\\ \Bigl{[}LON_{L,n,m}^{t},LAT_{L,n,m}^{t}\Bigr{]}=P_{calc}(i,\Omega,e,\omega,a,M_{0},t),\end{split}  \tag{2}\]  
where \(i,\Omega,e,\omega,a,M_{0}\) is orbital elements, \(t\) is the time when ES calculates the longitude and latitude of the satellite. The value of \(t\) can be the current time or the future time. \(P_{calc}\) is a function of calculating the longitude and latitude of the satellite at time \(t\) by orbital elements. According to the maximum communication distance of ES and the longitude and latitude of the satellite at \(t\) time, the coverage time \(t_{L,n,m}^{con}\) of \(S_{n,m}^{L}\) is calculated:  
Figure 3: Parameters in Equation (1). \[D_{ES,t}^{L,n,m}=f\Big{(}LON_{ES},LAT_{ES},H_{ES},LON_{L,n,m}^{t},LAT_{L,n,m}^{t},H_{L}\Big{)}\]  
\[ \begin{array}{c}LOC_{L,n,m}^{out}=\underset{LON,LAT}{argD_{\max}}\Big{(}D_{ES,t}^{L,n,m}\Big{)}\\ \\ t_{L,n,m}^{out}=\underset{t}{argLOC_{L,n,m}^{out}}(P_{calc})\\ \\ t_{L,n,m}^{con}=t_{L,n,m}^{out}-t_{0},\end{array}  \tag{3}\]  
where \(D_{ES,t}^{L,n,m}\) is the linear distance from \(S_{n,m}^{L}\) to ES. \(LON_{ES}\), \(LAT_{ES}\), and \(H_{ES}\) are the longitude, latitude, and altitude of the ES, respectively. \(H_{L}\) is the distance from \(S_{n,m}^{L}\) to the ground, and \(f\) is the function to calculate the distance between ES and \(S_{n,m}^{L}\). \(arg\) is the deformation of the inverse function. For example, \(Z=\underset{t}{arg\,X(f(t))}\) denotes that when \(f(t)=X\), the corresponding \(t\) value is assigned to \(Z\). A similar function to \(arg\) is used in Literature [26]. \(LOC_{L,n,m}^{out}\) denotes the latitude and longitude of \(S_{n,m}^{L}\) when \(D_{ES,t}^{L,n,m}\) equals \(D_{\max}\). \(t_{L,n,m}^{out}\) denotes the corresponding time when \(P_{calc}\) equals \(LOC_{L,n,m}^{out}\). \(t_{0}\) is the current moment. Satellites can obtain their latitude, longitude, and altitude in real-time through the positioning system. From Equations (1) and (3), when \(D_{ES,t}^{L,n,m}\leq D_{\max}\), \(S_{n,m}^{L}\in\mathbf{V}\), \(S_{n,m}^{L}\) is in the communication domain of ES. The traditional maximum coverage time algorithm and maximum elevation angle algorithm select the accessing satellites according to the coverage time and elevation angle, respectively, without considering the different demands of different ES for communication time at different times, which will cause problems such as wasting resources and increasing the number of switching. ES needs to send \(k\) data packets at time \(t\), the size of the \(i\) packet is denoted as \(pkg_{i}\), and the size of the last ACK is \(pkg_{A}\). The uplink and downlink of StarLink use different channels [27]. The uplink transmission rate is defined as \(\mathcal{R}_{U}\), and the downlink transmission rate is defined as \(\mathcal{R}_{D}\). The minimum time that ES needs to occupy ESL is \(t_{u}\):  
\[t_{u}=\frac{\sum\limits_{i=0}^{k-1}pkg_{i}}{\mathcal{R}_{U}}+\frac{pkg_{A}}{ \mathcal{R}_{D}}. \tag{4}\]  
The coverage time utilization rate of access satellite is an important parameter to measure the access algorithm. A higher utilization rate indicates that the access satellites selected are better matched with \(t_{u}\).