# BeiDou Short-Message Satellite Resource Allocation Algorithm Based on Deep Reinforcement Learning
## 2 System Model
### Path Transmission Loss Model  
First of all, we discuss the path transmission loss \(L\) of the satellite-to-ground link between the short-message satellite and the short-message terminal. \(n\times m\) satellite-to-Earth links can be established between the elements of set **SAT** and set **ST**, and the satellite-to-Earth link matrix \(\mathbf{E}_{m\times n}\) can be expressed as shown in Equation (3):  
\[\mathbf{E}_{m\times n}=\left[\begin{array}{cccc}e_{11}&e_{12}&\cdots&e_{1n} \\ e_{21}&e_{22}&\cdots&e_{2n}\\ \vdots&\vdots&\ddots&\vdots\\ e_{m1}&e_{m1}&\cdots&e_{mn}\end{array}\right] \tag{3}\]  
where \(e_{ij}\) is a Boolean variable indicating the link relationship between \(ST_{i}\) and \(SAT_{j}\). When \(e_{ij}=0\), \(ST_{i}\) and \(SAT_{j}\) do not establish a link relationship, but when \(e_{ij}=1\), \(ST_{i}\) and \(SAT_{j}\) establish a link relationship.  
Suppose the path transmission loss of the satellite-to-Earth link is \(L\), there is:  
\[L=l_{f}+l_{rain}+l_{a}+l_{o}. \tag{4}\]  
In Equation (4), \(L\) is the free-space path loss. \(l_{rain}\) is the rain loss. \(l_{a}\) is the atmospheric absorption loss, and its value is related to the antenna elevation angle \(\varphi\) at the transmitting terminal. \(l_{o}\) denotes other losses. \(l_{f}\) satisfies Equation (5):  
\[l_{f}=92.4+20\log f_{c}+20\log d. \tag{5}\]  
In Equation (5), \(d\) is the free-space transmission distance in \(km\). \(f\) is the frequency in \(MHz\). Generally, in the case of a fixed band, \(l_{f}\) is only related to \(d\). \(l_{rain}\), \(l_{a}\), and \(l_{o}\) can be used to obtain the corresponding value of the band used in the current scene by consulting the related literature [41].  
\(d\) can be obtained from geometric relations. Since the moving speed of the short-message terminal is very slow relative to the satellite speed, it can be assumed that the short-message terminal is motionless relative to the Earth [42]. In Figure 3, \(O\) is the geocenter, and \(T\) is the short-message terminal. \(S\) and \(N\) are, respectively, the position of the satellite and the sub-satellite point at time \(t\). \(\phi(t)\) is the geocentric angle between \(T\) and \(N\). \(\varphi(t)\) is the elevation angle of the short-message terminal between \(S\) and \(A\). \(R\) and \(h\) are the radius of the Earth and the orbital altitude, respectively.  
For \(\phi(t)\), there is:  
\[\phi(t)=\arccos\bigg{(}R\frac{\cos\varphi(t)}{h+R}\bigg{)}-\varphi(t). \tag{6}\]  
Figure 3: Geometric relationship between short-message terminal and satellite [43].  
Furthermore, the free-space transmission distance \(d\) is:  
\[d=\sqrt{\left(h+R\right)^{2}+R^{2}-2R(h+R)\cos\phi(t)}. \tag{7}\]  
For \(n\times m\) satellite-to-ground links, the path transmission loss matrix \(\mathbf{L}_{m\times n}\) between the elements of set **SAT** and set **ST** can be expressed as shown in Equation (8):  
\[\mathbf{L}_{m\times n}=\left[\begin{array}{cccc}L_{11}&L_{12}&\cdots&L_{1n} \\ L_{21}&L_{22}&\cdots&L_{2n}\\ \vdots&\vdots&\ddots&\vdots\\ L_{m1}&L_{m1}&\cdots&L_{mn}\end{array}\right]. \tag{8}\]  
Then, the total path transmission loss \(L_{total}\) that occurs when completing a message transmission in the current snapshot in the above set **ST** can be expressed as:  
\[L_{total}=\sum_{i=1}^{m}\sum_{j=1}^{n}l_{ij}e_{ji}. \tag{9}\]