# Onboard Centralized ISL-Building Planning for LEO Satellite Constellation Networks
## 4 Link-Building Planning
### Link-Building Planning Method Based on Topology Stability Optimization  
We provide a link-building planning method based on topology stability optimization (LPTSO) in this subsection, which can handle the link-building planning problem while providing very low algorithm time complexity. This method can improve topology performance, thus enabling satellites to execute link-building planning onboard autonomously. As discussed in Section 3, the satellite onboard computer calculates the position vector \(\mathbf{R}_{i}\) and the velocity vector \(\mathbf{S}_{i}\) for \(\forall i\in A\) in the period using the orbit extrapolation algorithm. Furthermore, the calculation of the visibility Boolean matrix in the period \(P\) takes it into account the installation positions of the antennas and the antenna turntable rotating thresholds, in order to ensure that multiple antennas with different installation positions on one satellite can build ISLs at the same time. The preliminary simulation shows that, in most of the LEO Walker Delta constellation, adjacent satellites in the same plane are visible to each other continuously [13; 33]. As a result, to build a more stable topology, in our method, all satellites build ISLs with the adjacent satellites permanently and form a ring in a plane; that is, the \(i\)th satellite in plane \(p\) builds ISLs with the \((i-1)\)th satellite and the \((i+1)\)th satellite in plane \(p\). However, the satellites in adjacent planes may not remain visible to each other and, so, inter-plane ISLs should be planned. The pseudo-code of the inter-plane link-building planning method discussed in this subsection is expressed by Algorithm 1. **Step one. ** From the three-dimensional Boolean visibility matrix, calculate the total ISL visible duration for any two inter-plane satellite antennas in the constellation in period \(P\); namely,  
\[visible\_duration_{i,j}=\sum_{k}^{K}v_{i,j,k}, \tag{29}\]where \(\textit{visible\_duration}_{i,j}\) is the sum of the visible time segments in period \(P\) between antenna \(i\) and antenna \(j\). ```
0: The visibility matrix of \(V\) and the number of time segments of \(K\)
0: The planning result of \(\textit{planning\_res}\)
1:for\(i:N\)do
2:for\(j:N\)do
3:\(\textit{visible\_duration}_{i,j}=\sum_{k}^{K}v_{i,j,k}\);
4:endfor
5:endfor
6:for\(i:N\)do
7:\(i^{f}=\underset{Z(i)}{\arg\max}\textit{visible\_duration}_{i,Z(i)}\);
8:for\(j:N\)do
9:if\(j\
otin i^{f}\)then
10:for\(k:K\)do
11:\(v_{i,j,k}=FALSE\);
12:endfor
13:endif
14:endfor
15:endfor
16:for\(k:K\)do
17:for\(i:N\)do
18:\(\textit{planning\_res}_{k,i}=\underset{j}{\arg\max}\textit{later\_broken}(v_{i,j,k})\);
19:endfor
20:endfor
```  
**Algorithm 1** Link-building_Planning(\(V,K\))  
**Step two. ** For any antenna \(\forall i\in A\) in the constellation, select an antenna \(i^{f}\) with the longest link duration sum in the period in each of antenna \(i\)'s two adjacent orbital planes; namely,  
\[i^{f}=\underset{Z(i)}{\arg\max}\textit{visible\_duration}_{i,Z(i)}. \tag{30}\]  
These two antennas can be defined as the first-choice antennas of antenna \(i\), and the associated links are defined as the first-choice ISLs. In addition, the link visibility between antenna \(i\) and its non-first-choice antennas in the link-visibility Boolean matrix should be set as invisible at all times in the period; that is, non-first-choice ISLs are not considered in the link-building planning of inter-plane ISLs, as represented by  
\[v_{i,j,k}=0,ifj\
eq i^{f}. \tag{31}\]  
**Step three. ** For each unused antenna in the constellation, select one unused antenna that is visible to it at this time, and keep the inter-plane ISL until the ISL is invisible. If there is more than one unused antenna visible simultaneously, select the antenna with the later broken visibility to establish an ISL with it. Compared with the time complexity of ILP, the time complexity of the method stated in this subsection is \(O(N\times N\times K)\), allowing it to reasonably be solved on a satellite onboard computer.