## 4 Time-Frequency-Space Resource Allocation Method in Sharing Network
### Mathematical Modeling
In addition, spatial resources are also an important factor that we need to consider. For \(BW_{k,b}\left(t\right)\), considering that users on different beams can reuse the same spectrum resources by means of MU pairing, it can be modeled as:  
\[TotalRes=\sum_{k=1}^{UserNum}\sum_{t=0.5}^{SchTime}\sum_{b=1}^{AllocFreq}\sum_{n=1}^{BeanID}\left(\alpha_{k,n,b}(t)\bullet BW_{k,n,b}(t)\right) \tag{5}\]  
where \(BeanID\) indicates the ID of the beams. Users who reuse the same spectrum resources have different \(BeanID\). \(TotalRes\) represents the total available frequency domain resources after taking into account the MU function. Then, the modeling formula of single-cell and multi-user is obtained:  
\[C=\underset{\alpha_{k,b}(t),BW_{k,b}(t)}{UserNum}\sum_{k=1}^{UserNum}\sum_{ t=0.5}^{SchTime}\sum_{b=1}^{AllocFreq}\sum_{n=1}^{BeanID}\left(\alpha_{k,n,b}(t)\bullet BW_{k,n,b}(t) \bullet log\left(1+\frac{S_{k,t,b,n}}{I_{k,t,b,n}+N_{k,t,b,n}}\right)\right) \tag{6}\]  
Finally, the formula of multi-cell (or multi-carrier) and multi-user can be modeled as:  
\[C=\underset{a_{k,i,k}(t),BW_{k,i,k}(t)}{UserNum}\sum_{k=1}^{UserNum}\sum_{ i=1}^{CurierNum}\sum_{t=0.5}^{SchTime}\sum_{b=1}^{AllocFreq}\sum_{n=1}^{BeanID}\left(\alpha_{k,i,n,b}(t)\bullet BW_{k,i,n,b}(t) \bullet SE_{k,i,t,b,n}\right) \tag{7}\]  
\[SE_{k,i,t,b,n}=log\left(1+\frac{S_{k,i,t,b,n}}{I_{k,i,t,b,n}+N_{k,i,t,b,n}}\right) \tag{8}\]  
where \(SE_{k,i,t,b,n}\) represents spectral efficiency, that is, the spectral efficiency of user \(k\) on \(b\)-th spectrum resource and \(n\)-th beam of carrier \(i\) at time \(t\). The meanings of each variable in the formula are as follows:  
* \(\alpha_{k,j,n,b}(t)\in\{0,1\}\): whether the \(b\)-th spectrum resources in beam \(n\) on carrier \(i\) are scheduled at time \(t\) by user \(k\). * \(BW_{k,i,n,b}\left(t\right)\): the \(b\)-th spectrum resource allocated for user \(k\) on carrier \(i\) in beam \(n\) at time \(t\), which is the allocation of time-frequency-space resources for each user. * \(S_{k,i,t,b,n},\ k_{k,i,t,b,n},\ N_{k,i,t,b,n}\): the signal strength, interference strength, and noise strength of user \(k\) on carrier \(i\) and \(b\)-th spectrum resource in beam \(n\) at time \(t\), respectively. * \(CarrierNum\): the number of carriers configured on the network side. The following constraints exist in the formula:
* \(\alpha_{k,i,n,b}(t)\in\{0,1\}\), map user \(k\) whether schedule the \(b\)-th spectrum resource on carrier \(i\) in beam \(n\) at time \(t\) or not to two states: 0 and 1. * \(\sum\limits_{k=1}^{NewNum\ AlliceFreq}(BW_{k,i,n,b}(t))\leq\textit{Total spectrum resource}\), the frequency spectrum resources allocated by all users at the same \(BeamID\) time will not exceed the total frequency spectrum resources. (e.g., 100 Mbit/s bandwidth corresponds to 18 RBGs). * For single user, \(CarrierNum=\min\) {maximum number of CA carriers supported by UE capability, number of carriers configured on the base station side}  
The above formula aims to optimize the allocation of time, frequency, and spatial resources within the scheduling duration \(SchTime\) while assigning frequency resources \(AllocFreq\), spatial resources \(BeamID\), and carrier resources \(CarrierNum\). The objective is to achieve the optimal network-wide experience rate for all users \(UserNum\). This process aims to determine for each user, carrier, beam, and frequency resource for each user. Utilizing the smart grid technology described in the following section, this optimization algorithm is provided with input. Then, by employing typical optimization-solving algorithms such as the branch and bound method and block coordinate descent method, the optimal resource allocation scheme for each user is obtained. The smart grid technology assists in offering inputs to the optimization algorithm. In the given formula, \(SE_{k,i,t,b,n}\) can be predicted using smart spectrum efficiency grids. \(BW_{k,i,n,b}(t)\) can be obtained from smart beam grids. \(\alpha_{k,i,n,b}(t)\) is determined through smart coverage grids.