## The Problem Formulation  
### The Basic Model of OFDM Power Allocation in CRNs  
In this article, we consider the following application situation for IoT within a CRN. The service range of a base station covers one primary user and \(K\) secondary users. The primary user and the secondary users use adjacent frequency bands, and the secondary users use OFDM transmission technology. Moreover, we assume that the channel is slowly fading within one OFDM symbol period, and the base station has full channel state information. The total number of subcarriers is \(N\), and the bandwidth of each subcarrier is \(W_{c}\). Let \(b_{k,n}\) be the transmission rate of user \(k\) on the subcarrier \(n\). Thus, the maximum number of bits in a symbol transmitted on this subcarrier is set to [35; 36; 37]  
\[b_{k,n}=\left\lfloor\log_{2}\left\lfloor 1+\frac{p_{k,n}g_{k,n}^{2}}{\delta(N_{ 0}W_{c}+S_{k,n})}\right\rfloor\right\rfloor, \tag{1}\]  
where \(\lfloor\cdot\rfloor\) denotes the floor function; \(p_{k,n}\) represents the power of user \(k\) on subcarrier \(n\); \(g_{k,n}\) is the channel gain of user \(k\) on subcarrier \(n\); and \(N_{0}\) represents the noise spectral density power, which is the same for all users and subcarriers, and it is a constant. In addition, \(S_{k,n}\) indicates the primary user's interference to the secondary user. The variable \(\delta\) indicates the BER of the transmission in the case of a physical layer using multiple quadrature amplitude modulation (MQAM) technology, and it can be expressed as  
\[\delta=-\frac{2}{3}\ln(5p_{e}), \tag{2}\]  
where \(p_{e}\) denotes the BER.  
Generally, in a CRN, the optimization goal of power resource allocation is to maximize the total transmission rate of the system for subusers under the restriction of the authorized users' interference threshold, total transmission power, and BER, so as to improve the spectrum utilization. Therefore, the problem can be modeled as  
\[\text{max}\quad W_{c}\sum_{n=1}^{N}\sum_{k=1}^{K}\lambda_{k,n}b_{k,n}=W_{c} \sum_{n=1}^{N}\sum_{k=1}^{K}\lambda_{k,n}\left\lfloor\log_{2}\left\lfloor 1+ \frac{p_{k,n}g_{k,n}^{2}}{\delta(N_{0}W_{c}+S_{k,n})}\right\rfloor\right\rfloor, \tag{3}\]s.t. \[\sum_{k=1}^{K}\lambda_{k,n}=1,\ \ \lambda_{k,n}=\begin{cases}0,\,b_{k,n}=0\\ 1,\,b_{k,n}\
eq 0\end{cases}\] (4) \[\sum_{n=1}^{N}\sum_{k=1}^{K}p_{k,n}\leqslant p_{\text{total}}\,\] (5) \[\sum_{n=1}^{N}\sum_{k=1}^{K}\lambda_{k,n}p_{k,n}F_{n}\leqslant I_{ \text{th}}\,\] (6) \[p_{e}\leqslant p_{u}.\] (7)  
Here, Equation (4) shows that a subcarrier can only be occupied by one user. In addition, \(\lambda_{k,n}\) is the subcarrier allocation state variable. It is equal to 1 only when the subcarrier \(n\) is occupied by user \(k\); otherwise, it is equal to 0. Equation (5) shows that the sum of the power \(p_{k,n}\) transmitted by all secondary users cannot exceed the total system upper power limit \(p_{\text{total}}\). In Equation (6), \(F_{n}\) represents the interference factor of the secondary users to the primary user on subcarrier \(n\), and \(I_{\text{th}}\) is the highest user-acceptable maximum interference limit. It means that all subusers' interference to the primary user should not exceed its tolerable upper limit \(I_{\text{th}}\). Moreover, Equation (7) indicates that the BER must be less than the maximum BER requirement \(p_{u}\)[38].