# In-Band Full-Duplex Relaying for SWIPT-Enabled Cognitive Radio Networks
## 2 System Model and Problem Formulation
### Achievable Rates and Problem Formulation  
The estimated data at FDR can be expressed as \(\mathbf{\hat{x}}=\mathbf{A}^{H}\mathbf{y}_{r}\). From (3) and (4), the signal-to-interference-plus-noise ratio (SINR) of the secondary system in each hop can be computed as:  
\[\gamma_{\texttt{ST},\mathbf{R}}= \frac{P_{\mathbf{s}}\left|\mathbf{a}_{\text{s}}^{H}\mathbf{h}_{s} \right|^{2}}{P_{\mathbf{p}}\left|\mathbf{a}_{s}^{H}\mathbf{h}_{p}\right|^{2}+P _{\mathbf{r}}\rho\left\|\mathbf{a}_{s}^{H}\mathbf{H}_{0}\mathbf{W}\right\|^{2 }+\sigma^{2}\left\|\mathbf{a}_{s}\right\|^{2}}, \tag{7}\] \[\gamma_{\texttt{R},\texttt{SR}}= \frac{P_{\mathbf{r}}\left|\mathbf{g}_{\text{s}}\mathbf{w}_{s} \right|^{2}}{P_{\mathbf{r}}\left|\mathbf{g}_{\text{s}}\mathbf{w}_{p}\right|^{2 }+\sigma^{2}}, \tag{8}\]  
where \(\mathbf{a}_{\text{s}}\) is the first column of \(\mathbf{A}\) corresponding to \(\mathbf{h}_{s}\); \(\mathbf{w}_{s}\) and \(\mathbf{w}_{p}\) are the first and second columns of \(\mathbf{W}\) corresponding to \(\mathbf{h}_{s}\) and \(\mathbf{h}_{p}\), respectively. Similarly, the SINR of the primary system during the time \((1-\alpha)T\) can be found as:  
\[\gamma_{\texttt{PT},\texttt{R}}= \frac{P_{\mathbf{p}}\left|\mathbf{a}_{p}^{H}\mathbf{h}_{p}\right| ^{2}}{P_{\mathbf{s}}\left|\mathbf{a}_{p}^{H}\mathbf{h}_{s}\right|^{2}+P_{ \mathbf{r}}\rho\left\|\mathbf{a}_{p}^{H}\mathbf{H}_{0}\mathbf{W}\right\|^{2}+ \sigma^{2}\left\|\mathbf{a}_{p}\right\|^{2}}, \tag{9}\] \[\gamma_{\texttt{R},\texttt{PR}}= \frac{P_{\mathbf{r}}\left|\mathbf{g}_{p}\mathbf{w}_{p}\right|^{2 }}{P_{\mathbf{r}}\left|\mathbf{g}_{p}\mathbf{w}_{s}\right|^{2}+P_{\mathbf{p}} \left|f_{pp}\right|^{2}+\sigma^{2}}, \tag{10}\]  
Figure 2: Time-switching relaying (TSR) protocol.  
where \(\mathbf{a}_{p}\) is the second column of \(\mathbf{A}\) corresponding to \(\mathbf{h}_{p}\). Furthermore, the SNR of the primary system for the direct link during the time \(\alpha T\) in (6) is found as:  
\[\gamma_{\texttt{PT},\texttt{PR}}=\frac{P_{\texttt{p}}\left|f_{pp}\right|^{2}}{ \sigma^{2}}. \tag{11}\]  
The end-to-end (e2e) achievable rate of the secondary system can be expressed as:  
\[R_{\texttt{s}}=(1-\alpha)\ln\bigl{(}1+\min\left(\gamma_{\texttt{ST},\texttt{R }},\gamma_{\texttt{R},\texttt{SR}}\right)\bigr{)}. \tag{12}\]  
Similarly, the e2e achievable rate of the primary system that uses a maximal-ratio-combining (MRC) to combine (9) and (11) can be written as:  
\[R_{\texttt{p}}=R_{\texttt{s}}+(1-\alpha)\ln\left(1+\min\left(\gamma_{\texttt{ PT},\texttt{R}},\gamma_{\texttt{R},\texttt{PR}}\right)\right), \tag{13}\]  
where \(R_{\texttt{s}}\triangleq\alpha\ln\left(1+\gamma_{\texttt{PT},\texttt{PR}}\right)\) is a linear function with respect to \(\alpha\).  
From (12) and (13), the optimization problem of maximizing the sum rate of the primary and secondary systems can be formulated as (To maximize the sum rate, we focus on the optimization of the time fraction \(\alpha\), which determines a trade-off between the energy harvesting and data transmission. The joint optimization of power allocation and time fraction will probably enhance the performance, but with much higher complexity.):  
\[\underset{\alpha}{\text{maximize}} R_{\texttt{s}}+R_{\texttt{p}},\] (14a) subject to \[0\leq\alpha\leq 1. \tag{14b}\]  
It can be seen that Problem (14) is non-convex, since the objective function in (14a) is non-concave. In what follows, a low-complexity approach to find the solution of (14) will be presented.