## 3 Interference Analysis and Dynamic Frequency Allocation
### Dynamic Frequency Allocation Algorithm  
We propose a dynamic frequency allocation algorithm based on the keep-out region to achieve the spectral coexistence between the systems. The cognition is achieved through the database approach, i.e., the satellite ephemeris, frequency allocation schemes and antenna patterns are shared between the gateways [37]. The position vector of the satellite in the Earth-Centered Earth-Fixed (ECEF) coordinate can be calculated with the satellite ephemeris [40], and then the position vector of the boresight intersection can be obtained according to the direction of the beam. Eventually, the distance between the two beams is also available. As the already deployed system, the frequency scheme of the GEO satellite is static, whereas the frequency of all LEO beams should be allocated dynamically during the motion of the LEO satellite. If any LEO beam is about to enter the keep-out region of the co-channel GEO beam according to the shared information, the frequency of the LEO beam must be changed. Furthermore, the adjacent LEO beams cannot use the same frequency concerning the frequency division multiplexing in the LEO satellite system. Therefore, all LEO beams need to be considered for reallocation.  
Let \(x_{ij}\in\{0,1\}\) indicate whether the \(i\)-th beam is allocated with the \(j\)-th frequency, and \(d_{ij}\) denotes the distance between the boresight intersections of the \(i\)-th beam with the \(j\)-th frequency and the nearest co-channel GEO beam. To minimize the CCI, we consider the maximum total distance of all LEO beams from the corresponding co-channel GEO beams as the objective. The optimization problem of the frequency allocation scheme can be formulated as:  
\[\begin{split}&\max\sum_{i,j}x_{ij}\cdot d_{ij},\\ &\text{s.t.}\begin{cases}\sum_{j}x_{ij}=1\left(i=1,...,N\right),\\ \sum_{j}x_{ij}\cdot d_{ij}\geq l_{\text{th}},\\ x_{ij}+x_{kj}=1\left(j=1,...,K;i\,\text{and}\,k\,\text{are adjacent},\right) \end{cases}\end{split} \tag{27}\]  
where \(N\) represents the number of the LEO beams; \(K\) represents the frequency reuse factor of the GEO satellite, and \(l_{\text{th}}\) represents the radius of the keep-out region.  
Usually, the implicit enumeration method is a valid option to solve the 0-1 integer linear programming (27) [45]. However, the computation increases exponentially with \(N\). In addition, because of the LEO motion, if it should be optimized in real time, it would be extremely costly, and the beam frequency would switch too frequently. Therefore, we propose Algorithm 1 based on the clustering idea.  
Figure 5: Schematic of the keep-out region.  
```
0:\(l\)th,\(T_{0}\)
0:\(x_{ij}\) Begin:  Divide LEO beams into \(N_{0}\) clusters based on 7-cell frequency reuse pattern. for\(a=1\) to \(N_{0}\)do  Determine the frequency allocation scheme of each cluster based on (27). endfor for\(t=1\) to \(T_{0}\)do if\(\exists i_{0}\in i\), s.t. \(\sum\limits_{j}x_{ij}\cdot d_{ij}<l_{\text{th}}\)then  Identify which cluster beam \(i_{0}\) belongs to, and redetermine the scheme of this cluster. endif endfor
```  
**Algorithm 1** Dynamic frequency allocation algorithm.  
According to the algorithm, all LEO beams are divided into clusters in Figure 6, and the allocation scheme is optimized in each cluster, which reduces the computation significantly. In addition, the scheme continues until there is an LEO beam about to enter the keep-out region of the co-channel GEO beam, and only the scheme of the conflicted cluster is reallocated, which reduces the frequency of switching.