# Secure Beamforming in 5G-Based Cognitive Radio Network
## 3 System Model
### Secrecy Outage Probability  
The secrecy outage probability of the PU and the SU in a cluster was analyzed in consent with the CR power allocation policy. This says that the PU permits the SU to reuse the spectrum by assuring a PUs quality of service. The PU will obtain a target data rate of \(\text{D}_{\text{pu}}^{\text{J, A}}\) by modifying the power allocation coefficient of \(\omega_{pu}^{\text{L,A}}\). Then, the limitation is given by  
\[\frac{\psi\left|\left|C_{\text{pu}}^{\text{J,A}}v^{\text{L,A}}\right|^{2}\omega _{\text{pu}}^{\text{L,A}}\right.}{\psi\left|\left|C_{\text{pu}}^{\text{L,A}}v^ {\text{L,A}}\right|^{2}\omega_{\text{su}}^{\text{L,A}}+\ 1\right.}>\ \varepsilon_{\text{pu}}^{\text{L,A}} \tag{20}\]  
where \(\varepsilon_{\text{pu}}^{\text{L,A}}=2^{\text{D}_{\text{pu}}^{\text{L, A}}}-1\). This gives a following alternative as  
\[\omega_{\text{su}}^{\text{L,A}}=\max(0,\ \frac{\psi\left|G_{\text{pu}}^{\text{L, A}}v^{\text{L,A}}\right|^{2}-\varepsilon_{\text{pu}}^{\text{L,A}}}{(1+ \varepsilon_{\text{pu}}^{\text{L,A}})\psi\left|G_{\text{pu}}^{\text{L,A}}v^{ \text{L,A}}\right|^{2}}) \tag{21}\]  
The target data rate is not achieved, even when the full power is assigned to it. Thus, the secrecy outage probability of the PU and the SU is implied as follows:  
\[\text{SOP}_{\text{pu}}^{\text{L,A}} \overset{\text{def}}{=}\Pr\left[\log_{2}\left(1+\psi\left|G_{\text{ pu}}^{\text{L,A}}v^{\text{L,A}}\right|^{2}\right)<\text{D}_{\text{pu}}^{\text{J, A}}\right] \tag{22}\] \[\text{SOP}_{\text{su}}^{\text{L,A}} \overset{\text{def}}{=}\Pr\left[\log_{2}\left(1+\psi\left|G_{ \text{su}}^{\text{L,A}}v^{\text{L,A}}\right|^{2}\right)<\text{D}_{\text{su}}^{ \text{J, A}}\right] \tag{23}\]Let the asymptotic expression of channel gain and proposed vector will be taken as  
\[\left|\mathrm{G}_{\mathrm{pu}}^{\mathrm{I,A}}\mathrm{v}^{\mathrm{I,A}}\right|^{2} \sim\left\lceil\left(N(S-1),\ \left(\sigma_{pu}^{I,A}\right)^{2}\right)\right. \tag{24}\]  
\[\left|\mathrm{G}_{\mathrm{su}}^{\mathrm{I,A}}\mathrm{v}^{\mathrm{I,A}}\right|^{2} \sim\left\lceil\left(N(S-1),\ \left(\sigma_{su}^{I,A}\right)^{2}\right)\right. \tag{25}\]  
Then, applying the gamma function in the above assumption is given [12] as  
\[\frac{1}{\lceil\left(N(S-1)\right)}\gamma\Bigg{(}N(S-1),\ \frac{J_{3}}{\left( \sigma_{pu}^{k,A}\right)^{2}}\Bigg{)}\approx\frac{1}{\lceil q}\left(\frac{r}{ \psi}\right)^{q}\sum_{f=1}^{q}\theta_{f}\varnothing_{f} \tag{26}\]  
Let \(q\sim\lceil\left(N(S-1)\right)\) and \(r\sim\frac{J_{3}}{\left(\sigma_{pu}^{I,A}\right)^{2}}\), where \(\gamma(q,\ r)\stackrel{{\text{\tiny def}}}{{=}}\int_{0}^{r}\varphi ^{q-1}\exp(-\varphi)d\varphi\) denotes the lower incomplete gamma function as \(\varphi=\frac{fr}{\delta\psi}\) and \(\theta_{f}=\left(\frac{i}{\delta}\right)^{a-1}\), \(\varnothing_{f}=e^{\frac{fr}{\delta\psi}}\). The asymptotic expression of Equation (12) is obtained by applying the [PERSON]'s 1/3 numerical integration method [12]. Here, \(J_{3}\stackrel{{\text{\tiny def}}}{{=}}\frac{\varepsilon_{pu}^{I,A }}{\left\|\mathrm{g}\omega_{pu}^{I,A}\right\|}\) and \(\left|\mathrm{G}_{\mathrm{pu}}^{I,A}\mathrm{v}^{I,A}\right|^{2}\stackrel{{ \text{\tiny def}}}{{=}}Z\sim\left(N(S-1),\ \left(\sigma_{pu}^{I,A}\right)^{2}\right)\). The secrecy outage at PU is same as the conventional orthogonal multiple-access systems [5]. Then, the secrecy outage at SU is found in three different scenarios as: Event T\({}_{1}\) for \(\omega_{su}^{k,A}=0\), Event T\({}_{2}\) for \(\omega_{su}^{I,A}>0\) where the SU is unable to decode the message for both the PU and the SU [5], and Event T\({}_{3}\) for \(\omega_{su}^{I,A}>0\) where the SU is unable to decode its own message but it is able to decode the message for PU [5]. The probability of a T\({}_{1}\) is expressed as  
\[P(T_{1})=P[\psi Z-\varepsilon_{pu}^{I,A}<0]\approx\frac{1}{\lceil q}\left( \frac{r}{\psi}\right)^{q}\sum_{f=1}^{q}\theta_{f}\varnothing_{f} \tag{27}\]  
The probability of T\({}_{2}\) is found as \(P(T_{2})=0\).