# Game Algorithm for Resource Allocation Based on Intelligent Gradient in HetNet
## 3 Stackelberg Game Model and Problem Statement
### Utility Functions  
Femtocells in the system model of this paper are randomly deployed, which will make macro users close to femtocells susceptible to severe cross-layer interference and ultimately influence the throughput capacity of the system. To resist cross-layer interference, the macro base station will choose some macro users that cannot receive good service from it and allocate them to femtocells close by encouraging femtocell to expand its service area. The cost for macro base station is that some originally available spectrum will be used by femtocell to serve those macro users separated out, thus realizing optimal community energy efficiency through adjusting self-possessed spectrum resources. To ensure the overall system performance, we attempt to define the utility function of participants as average throughput capacity. Firstly, for users of the macro base station, the average throughput capacity of macro users can be defined as follows:  
\[r_{m_{i}}=\frac{1}{S_{m}}(1-\alpha)W\log_{2}(1+SINR_{m_{i}}) \tag{4}\]  
where \(W\) is the overall bandwidth that can be provided by the system. As for femtocell, the average throughput capacity of family users before the service area is expanded can be defined as follows:  
\[r_{j,i}=\frac{1}{S_{F_{j}}}(1-\alpha)W_{j}\log_{2}(1+SINR_{j,i}) \tag{5}\]  
where \(W_{j}\) is the bandwidth occupied by femtocell \(F_{j}\). After the expansion of service area, partial macro users will be served by a femtocell using \(\alpha\times W\) frequency band, and its average throughput capacity of users can be defined as follows:  
\[r_{j,i}^{c}=\frac{1}{S_{F_{j}}^{c}}\alpha W_{j}\log_{2}(1+\frac{SINR_{j,i}^{*} }{\beta_{j}}) \tag{6}\]  
where \(\beta_{j}\) is community expansion coefficient and \(S_{F_{j}}^{c}\) is the number of extra users served by femtocell after uninstalling load of macro base station, which is also positively correlated with \(\beta_{j}\). Based on the average throughput capacity defined above, we can define the utility function of game players. The users defined above are randomly distributed. Therefore, for any random users, the minimal average throughput capacity \(r\) can be obtained through Equations (4)-(6). Assuming that \(r_{0}\) is the minimal average throughput capacity of system users, the utility function of a base station can be defined as follows:  
\[U=N\log(\frac{r}{r_{0}}) \tag{7}\]  
This utility function ensures the proportional fairness among the users. Meanwhile, \(\partial^{2}U/\partial r^{2}\leq 0\), based on which it can be judged that this utility function is a concave function, i.e., Nash equilibrium of the system can be obtained through a linear optimization algorithm. Thus, we can establish a Stackelberg game model in which the macro base station acts as the leader, and the femtocells act as the followers. In the following, we will discuss specific revenue function expressions for femtocells and the macro base station. Based on the spectrum reuse scheme, the reward to be obtained by femtocells is the partial spectrum from the macro base station. The rate of these spectrum accounts for \((1-\alpha)\cdot W\). If the transferred spectrum of the macro base station exceeds its own capacity, the average throughput capacity will decrease. Hence, the rate of the transferred spectrum shall be prudently chosen. Similarly, to ensure the throughput of the overall system, the bias of numbers to be accepted by femtocells shall not exceed its own capacity. This means that there is a compromise of two conditions between leaders and followers. Only in this way, can the overall performance of system be ensured. For the femtocells, a plan is made for each femtocell according to the obtained rate parameters, and some surrounding macro users are chosen to provide service for them. In other words, cell expansion bias \(\beta_{j}\) expresses the rate between the final user number included in the femtocell service scope and the initial user number of the femtocell.