### Prediction method of time series based on AI

Transformers were proposed by Vaswani et al. [21] as an architecture to efficiently model sequences. Each transformer block consists of a multi-head self-attention (MHSA) layer and a feed-forward multilayer perceptron (MLP), as shown in Fig. 6. The MHSA generates a trainable associate memory with a query (*Q*) and a pair of key (*K*)-value (*V*) pairs to an output via linearly transforming the input. Mathematically, the output of a MHSA is calculated by:

$${\text{Attention }}\left( {Q,K,V} \right) = {\text{softmax}}\left( {QK^{{\text{T}}} /\sqrt d } \right)V$$

(11)

where \(\sqrt d\) is a scaling factor based on the depth of the network. The output of the MHSA is then normalized and fed into the MLP to generate the input to the next block. In the above self-attention, \(Q\) and \(K\) are multiplied to generate the attention map, which represents the correlation between all the tokens within each layer. It is used to retrieve and combine the embeddings in the value \(V{ }\). This allows the layer to assign “credit” by implicitly forming state–return associations via similarity of the query and key vectors.

### Power control method

The airborne ATG CPE power control algorithm based on AI prediction is used to eliminate interference to the 5G network. The airborne ATG CPE monitors the received ground 5G BS reference signal and records the reference signal receiving power RSRP. Assume that the airborne ATG CPE can monitor and record \(N\) RSRP values of the largest BS

$$\user2{\rm I} = \left[ {\user2{\rm I}_{1} ,\user2{\rm I}_{2} , \ldots ,\user2{\rm I}_{{\mathbf{N}}} } \right]$$

(12)

where \(\user2{\rm I}_{n}\) represents the RSRP time series of the 5G base station received and recorded by the ATG CPE.

Time series is

$$\user2{\rm I}_{n} = \left[ {I_{T - L}^{n} , \ldots ,I_{T - 1}^{n} ,I_{T}^{n} } \right]$$

(13)

where \(T\) is the current time and \(L\) is the length of time series. When the 5G BS RSRP power \(P_{{{\text{BS}}}}\) and the power on the same time–frequency unit of the ATG CPE are known, the estimated interference of the ATG CPE to the 5G BS is

$$\hat{I}_{T - l}^{n} = I_{T - l}^{n} - P_{{{\text{BS}}}} + P_{{{\text{CPE}}}}$$

(14)

Then we can know

$${\hat{\user2{I}}}_{{\varvec{n}}} = \left[ {\hat{\user2{I}}_{{{\varvec{T}} - {\varvec{L}}}}^{{\varvec{n}}} , \ldots ,\hat{\user2{I}}_{{{\varvec{T}} - 1}}^{{\varvec{n}}} ,\hat{\user2{I}}_{{\varvec{T}}}^{{\varvec{n}}} } \right]$$

(15)

$${\hat{\user2{I}}} = \left[ {{\hat{\user2{I}}}_{1} ,{\hat{\user2{I}}}_{2} , \ldots ,{\hat{\user2{I}}}_{{\varvec{N}}} } \right],$$

(16)

Using AI model to predict time series

$${\hat{\user2{I}}}_{{\varvec{n}}} = \left[ {\hat{\user2{I}}_{{{\varvec{T}} - {\varvec{L}}}}^{{\varvec{n}}} , \ldots ,\hat{\user2{I}}_{{{\varvec{T}} - 1}}^{{\varvec{n}}} ,\hat{\user2{I}}_{{\varvec{T}}}^{{\varvec{n}}} } \right]$$

(17)

seeing process 1 for training process of AI model, input

$${\hat{\user2{I}}}_{{\varvec{n}}}^{\user2{^{\prime}}} = \left[ {\hat{\user2{I}}_{{{\varvec{T}} - {\varvec{L}}}}^{{\varvec{n}}} , \ldots ,\hat{\user2{I}}_{{{\varvec{T}} - 1}}^{{\varvec{n}}} ,\hat{\user2{I}}_{{\varvec{T}}}^{{\varvec{n}}} } \right],$$

(18)

and output

$${\hat{\user2{I}}}_{{\mathbf{n}}}^{\prime \prime } = \left[ {\hat{I}_{T + 1}^{n} , \ldots ,\hat{I}_{T + M}^{n} .} \right]$$

(19)

Setting the tolerance limit of 5G BS for interference on each time–frequency resource as \(I_{{{\text{MAX}}}}\), the combination vector is

$${\hat{\user2{I}}}^{^{\prime}} = \left[ {{\hat{\user2{I}}}_{1}^{^{\prime}} ,{\hat{\user2{I}}}_{2}^{^{\prime}} , \ldots ,\user2{\hat{I}}_{{\mathbf{N}}}^{^{\prime}} } \right] = \left[ {\hat{\user2{I}}_{{{\varvec{T}} + 1}}^{1} , \ldots ,\hat{\user2{I}}_{{{\varvec{T}} + {\varvec{M}}}}^{1} , \ldots ,\hat{\user2{I}}_{{{\varvec{T}} + 1}}^{{\varvec{n}}} , \ldots ,\hat{\user2{I}}_{{{\varvec{T}} + {\varvec{M}}}}^{{\varvec{n}}} , \ldots ,\hat{\user2{I}}_{{{\varvec{T}} + 1}}^{{\varvec{N}}} , \ldots ,\hat{\user2{I}}_{{{\varvec{T}} + {\varvec{M}}}}^{{\varvec{N}}} } \right].$$

(20)

It can be seen from the above that the transmission power control bias of the ATG CPE can be set to

$${\varvec{P}}_{{{\varvec{CPE}}\_{\varvec{offset}}}} = {\varvec{MAX}}\left\{ {\left[ {\hat{\user2{I}}_{{{\varvec{T}} + 1}}^{1} , \ldots ,\hat{\user2{I}}_{{{\varvec{T}} + {\varvec{M}}}}^{1} , \ldots ,\hat{\user2{I}}_{{{\varvec{T}} + 1}}^{{\varvec{n}}} , \ldots ,\hat{\user2{I}}_{{{\varvec{T}} + {\varvec{M}}}}^{{\varvec{n}}} , \ldots ,\hat{\user2{I}}_{{{\varvec{T}} + 1}}^{{\varvec{N}}} , \ldots ,\hat{\user2{I}}_{{{\varvec{T}} + {\varvec{M}}}}^{{\varvec{N}}} } \right] - {\varvec{I}}_{{{\varvec{max}}}} } \right\}$$

(21)

When \(P_{{{\text{CPE}}\_{\text{offset}}}} \le 0\), interference elimination power control is not required. When \(P_{{{\text{CPE}}\_{\text{offset}}}} > 0\), it is necessary to power control the transmission power

$$P_{{{\text{CPE}}}}^{^{\prime}} = P_{{{\text{CPE}}}} - P_{{{\text{CPE}}\_{\text{offset}}}}$$

(22)

The selection of the prediction length \(M\), for a larger value \(M\), will more effectively protect the 5G BS from interference. However, with the increase in \(M\) the prediction accuracy decreases, it will cause unnecessary power bigotry of the ATG CPE and degrade the uplink performance of the ATG network. For smaller value \(M\), the decision-making time of ATG CPE will be shortened, and the potential interference risk to 5G BS will increase. Therefore, an appropriate value will also affect the performance of the algorithm.

### Training process of AI model

From Fig. 7, the results of numerical analysis, in extreme cases, ATG CPE will cause co-channel harmful interference to 5G base stations. In order to avoid harmful interference in such extreme cases, we design a power control method based on artificial intelligence timing sequence prediction. The ML-based prediction parameter configuration is shown in the table above. Based on the interference from the time series *T* − *L* to *T*, the interference value from *T* + 1 to *T* + *M* is effectively predicted, and the pre-power is performed based on the interference prediction to avoid interference to the 5G base station.