## 2 System Model  
Consider a relay aided cognitive network where a secondary source user \(SS\) establishes a link with a secondary destination user \(SD\) via a secondary AF relay station \(SR\). Unlike [17], where the direct path from \(SS\) to \(SD\) is ignored, we consider a more general scenario with a direct path. The primary network consists of a pair of primary source user \(PS\) and primary destination user \(PD\). The secondary users share the whole spectrum with the primary users in underlay mode. Assume that the spectrum is divided into \(N\) subcarriers in OFDM mode. Denote the channel coefficients from \(SS\) to \(SR\) and to \(SD\) over subcarrier \(i\) as \(h_{s,i}\) and \(h_{d,i}\), respectively. Similarly, the channel coefficient from \(SR\) to \(SD\) over subcarrier \(j\) is represented by \(h_{r,j}\). The subcarrier pairing technique is applied here. Subcarrier \(i\) of the received signal and subcarrier \(j\) of the forwarded signal form a subcarrier pair \((i,j)\). Then, \(I_{s,i}\) and \(\hat{h}_{r,j}\) denote the interference channel coefficients of \(SS\to PD\) link and \(SR\to PD\) link, respectively. It is well known that interference is mutual. The equivalent channel coefficients from \(PS\) to \(SR\) and from \(PS\) to \(SD\) are denoted by \(h_{s,i}^{p}\) and \(h_{d,i}^{p}\), respectively.  
The transmission powers at \(SS\) and \(SR\) are given by \(p_{s,i}\) and \(p_{r,j}\), respectively. Similarly, the transmission power at \(PS\) is denoted by \(q_{s,i}\). The data rate of the secondary user over the subcarrier pair \((i,j)\) is given by  
\[r_{i,j}= \frac{1}{2}\log_{2}\left(1+p_{s,i}g_{i}+\frac{p_{s,i}a_{i}p_{r,j}b_{j}}{p _{s,i}a_{i}+p_{r,j}b_{j}+1}\right)\approx\frac{1}{2}\log_{2}\left(1+p_{s,i}g_ {i}+\frac{p_{s,i}a_{i}p_{r,j}b_{j}}{p_{s,i}a_{i}+p_{r,j}b_{j}}\right) \tag{1}\]  
where  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**References** & **Cognitive** & **OfDM** & **Relaying** & **Direct** & **Power** & **Subcarrier** \\  & **Radio** & **Protocol** & **Link** & **Allocation** & **Pairing** \\ \hline
[6] & & & AF & & \(\surd\) & & \\
[7] & & & AF & \(\surd\) & & \\
[8] & \(\surd\) & \(\surd\) & AF & & \(\surd\) & \(\surd\) \\
[9] & \(\surd\) & \(\surd\) & AF & & \(\surd\) & \(\surd\) \\
[10] & \(\surd\) & \(\surd\) & AF and DF & \(\surd\) & \(\surd\) & \\
[11] & \(\surd\) & \(\surd\) & DF & \(\surd\) & & \\
[12] & \(\surd\) & \(\surd\) & DF & \(\surd\) & & \\
[13] & \(\surd\) & \(\surd\) & DF & \(\surd\) & \(\surd\) & \(\surd\) \\
[14] & \(\surd\) & \(\surd\) & & \(\surd\) & \(\surd\) & \\
[15] & \(\surd\) & \(\surd\) & & \(\surd\) & \(\surd\) & \\
[16] & \(\surd\) & \(\surd\) & & \(\surd\) & \(\surd\) & \\
[17] & \(\surd\) & \(\surd\) & AF & & \(\surd\) & \(\surd\) \\
[18] & \(\surd\) & & AF & \(\surd\) & & \\
[19] & \(\surd\) & \(\surd\) & AF & \(\surd\) & & \\
[20] & \(\surd\) & & AF & \(\surd\) & \(\surd\) & \\
[21] & \(\surd\) & \(\surd\) & AF & \(\surd\) & \(\surd\) & \\
[22] & \(\surd\) & & DF & \(\surd\) & \(\surd\) & \\ Our paper & \(\surd\) & \(\surd\) & AF & \(\surd\) & \(\surd\) & \(\surd\) \\ \hline \hline \end{tabular}
\end{table}
Table 1: A comparison of different works.  
\[a_{i}=\frac{\left|h_{s,j}\right|^{2}}{q_{s,i}\left|h_{s,j}^{p}\right|^{2}+N_{0}},b _{j}=\frac{\left|h_{r,j}\right|^{2}}{q_{s,j}\left|h_{d,j}^{p}\right|^{2}+N_{0}},g _{i}=\frac{\left|h_{d,i}\right|^{2}}{q_{s,i}\left|h_{d,i}^{p}\right|^{2}+N_{0}} \tag{2}\]  
and \(N_{0}\) is noise variance. The approximation in Equation (1) has been widely applied, such as [17].