{'fraction_non_alphanumeric': 0.04401493256262042, 'fraction_numerical': 0.011741329479768785, 'mean_word_length': 4.164490049751244, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 2, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Joint Secure Beamforming for Cognitive Radio Networks with Untrusted Secondary Users

In this paper, we consider simultaneous wireless information and power transfer (SWIPT) in orthogonal frequency division multiple access (OFDMA) systems with the coexistence of information receivers (IRs) and energy receivers (ERs). The IRs are served with best-effort secrecy data and the ERs harvest energy with minimum required harvested power. To enhance physical-layer security and yet satisfy energy harvesting requirements, we introduce a new frequency-domain artificial noise based approach. We study the optimal resource allocation for the weighted sum secrecy rate maximization via transmit power and subcarrier allocation. The considered problem is non-convex, while we propose an efficient algorithm for solving it based on Lagrange duality method. Simulation results illustrate the effectiveness of the proposed algorithm as compared against other heuristic schemes.


I. INTRODUCTION
Cognitive radio [1] was proposed as an efficient method to improve the spectrum efficiency of wireless networks. It allows primary user (PU) networks to share their spectrum with the secondary users (SUs), provided that the SU's transmission does not adversely affect the PU's performance. Usually there are three models of cognitive radio networks (CRN): interweave, underlay and overlay models. In the interweave model, the SUs first sense the spectrum holes and then transmit when the PUs are absent [2]. In the underlay model, the SUs simultaneously transmit with the PUs over the same spectrum, while maintaining the performance of primary transmission under an acceptable threshold [3]. The overlay model enables users cooperation where the SUs aid the PUs' transmission in exchange for their own transmission, thus not only enhancing the spatial reusability but also enlarging the coverage range [4], [5]. Note that the three models have their own advantages and disadvantages, and are applicable for different scenarios and services.
Nevertheless, PU-SU cooperation based overlay model in CRNs may result in severer security problems than the interweave and underlay models since SUs have to decode the PUs' messages before relaying. Note that even without the security consideration, which one of the underlay and cooperative-based overlay models is better is case-dependent. Then a question arises: if the SUs are untrusted, how are the performance of the underlay and cooperative models?
To address the security problem, physical-layer security is a promising secure communication means and becomes an emerging area recently [6]- [9]. In [6], the authors studied the problem of maximizing the secrecy capacity in multiple-input multiple-output (MIMO) one-way relaying systems by joint secure beamforming design at the source and the untrusted relay. It is shown that the secrecy rate can be improved even with the aid of an untrusted relay. The similar problem was studied for MIMO two-way relaying system in [7]. The authors in [8], [9] studied physical-layer security in OFDMA systems with simultaneous wireless information and power transfer.
In the CRN scenario, physical-layer security has been studied by avoiding information leakage to a third party (or an external) eavesdropper [10], [11]. There is another security issue where SUs try to eavesdrop PUs' message without permission, since SUs may easily know PUs' transmission spectrum by spectrum sensing. To our best knowledge, only [12] considered such case, while the authors focused on the achievable rate characterization for cooperative model in single-input single-output (SISO) channel.
In this paper, we study the secure beamforming design for a CRN consisting of a PU pair and an SU pair. Each dedicated transmitter-receiver pair is a multiple-input single-output (MISO) link. The SU is considered to be untrusted in the sense it may eavesdrop PU's transmission. We study two transmission schemes, namely underlay scheme and cooperative scheme. Our goal is to minimize the total power consumption while satisfying the PU's required secrecy rate and the SU's required information rate. Using suitable optimization tools, we design the joint secure beamforming for both schemes. The simulation results show that the underlay scheme is superior to the cooperative scheme, especially with high required rates of both PU and SU and a large number of SU-Tx's antennas.
Notations: Bold upper and lower case letters denote matrices and vectors, respectively. Let (·) H denote the conjugate transpose. The matrix I N is an N × N identity matrix and the matrix 0 is an all-zero matrix with appropriate dimensions. For matrix X, vec(X), tr(X) represent the vectorization and trace of matrix X, respectively. X ⊗ Y stands for the kronecker product of X and Y . For a vector x, we use ||x|| 2 to denote its two-norm.

II. SYSTEM MODEL AND PROBLEM FORMULATION
We consider a CRN consisting of four nodes: a primary transmitter (PU-Tx), a primary receiver (PU-Rx), a secondary transmitter (SU-Tx) and a secondary receiver (SU-Px) as shown in Fig. 1. PU-Tx and SU-Tx are equipped with N p ≥ 2 and N s ≥ 2 antennas, respectively; while each of the receivers is equipped with single antenna. The SU is untrusted in the sense it may disguise as an innocent user and attempt to decode PU's information. Thus, the SU is considered to be a potential eavesdropper.
Let H 0 ∈ C NS ×NP denote the channel of PU-Tx to SU-Tx link, h pp ∈ C NP ×1 the channel of PU-Tx to PU-Rx link, h sp ∈ C NS ×1 the channel of SU-Tx to PU-Rx link and h ps ∈ C Np×1 the channel of PU-Tx to SU-Rx link. we assume full channel state information (CSI) are available at all nodes. We also assume that all nodes operate in half-duplex mode for the practical consideration.
In the paper, we study two schemes described in the following.

A. Underlay Scheme
First, we consider an underlay scheme as shown in Fig.  1(a), where the PU-Tx and the SU-Tx simultaneously transmit information to their dedicated receivers in a spectrum-sharing manner. The signals received at the PU-Rx and SU-Rx are respectively given by where s 1 and s 2 are the information-carrying symbol of PU-Tx and SU-Tx, respectively; w 1 and w 2 represent the transmit beamforming vectors of PU-Tx and SU-Tx, respectively; and n p and n s denotes the the additive white Gaussian noise (AWGN) following CN (0, σ 2 ) at PU-Rx and SU-Rx, respectively.
For the underlay scheme, the SU-Rx is capable of eavesdropping PU-Tx's transmission and the secrecy rate of PU thus is given by [13] R s,u where [·] + max(0, ·). The information rate of SU is given by Our goal is to design the PU's and SU's beamforming w 1 and w 2 to minimize the total power consumption and the formulated problem is given by where Q p is the minimal secrecy rate requirement for PU and Q s is the minimal information rate requirement for SU.

B. Cooperative Scheme
For cooperative scheme, the SU is willing to help the PU transmission using amplify-and-forward (AF) relaying to access the channel but considered to be untrusted.
The cooperative scheme consists of two time slots, as shown in Fig. 1(b). In the first time slot, the PU-Tx transmits its signal to the SU-Tx which is also received by the PU-Rx and SU-Rx. The received signals at SU-Tx, SU-Rx and PU-Rx in the first time slot are respectively given by where n r represents the AWGN vector at SU-Tx following the distribution CN (0, σ 2 I Ns ).
In the second time slot, the SU-Tx amplifies and forwards the PU-Tx's signal, and simultaneously transmits its own signal to SU-Rx while PU-Tx remains silent. The received signals at PU-Rx and SU-Rx in the second time slot are respectively given by Note that if SU-Rx can successfully receive message sent from PU-Tx in the first time slot, then the interference term h H ss FH 0 w 1 s 1 can be subtracted from (11) using the received signal to improve secondary transmission.
In this scheme, the PU-Rx receives two independent copies of the signal transmitted by the PU-Tx in two time slots, respectively. The first copy of the signal is from the direct transmission by the PU-Tx in the first time slot and the second is forwarded by the SU-Tx in the second time slot. By maximal ratio combining (MRC) to these two signals, the PU-Rx can thus retrieve the PU-Tx's information.
Here we consider the worst-case scenario where the SU-Tx and SU-Rx are perfectly colluding, i.e., the output of the wiretap channel is the collection of signals received by the SU-Tx and SU-Rx. Thus, the PU-Tx to the colluding eavesdroppers link and signal-to-noise ratio (SNR) of the colluding wiretap channel are denoted by Thus, the secrecy rate for PU and the information rate for SU are respectively given by where factor 1 2 results from the half-duplex transmission mode; γ p and γ s are the signal-to-interference-and-noise ratio (SINR) at PU-Rx and SU-Rx, respectively given by where a is a binary variable with a = 0 indicating that SU-Rx correctly receives the signal from PU-Tx in the first time slot and thus can subtract the interference in the second time slot and otherwise a = 1. In this paper, we assume a = 1, which is the worst case. The power consumption of transmit power for PU-Tx, SU-Tx to relay PU-Tx's information, and SU-Tx to transmit its own information can be obtained as Thus, with the aim to jointly design w 1 , w 2 and F, the power minimization problem for the cooperative scheme is formulated as III. BEAMFORMING DESIGNS FOR UNDERLAY SCHEME To solve (P1) optimally, we define w [w H 1 w H 2 ] H so as to jointly optimize w 1 and w 2 . For this problem, it can be shown that there always exists an SINR constraint β 1 at PU-Rx such that the following quadratically constrained quadratic problem (QCQP) has the same optimal solution to (P1), where we define Let g 1 (β 1 ) denote the optimal value of (P1.1) with given β 1 . It can thus be shown that (P1) achieves the same optimal value of the following problem: Therefore, the β * 1 can be optimally solved by one dimension search over β 1 > 0. With any given β 1 , g 1 (β 1 ) is obtained by solving (P1.1). Thus, in the following, we only need to focus on the solution for (P1.1).
By introducing X 1 ww H , (P1.1) can be equivalently rewritten as where X 1 0 means that X 1 is a positive semidefinite (PSD) matrix and the above problem is a semidefinite programming (SDP) problem. Note that the SDP problem in (28) is non-convex due to the the rank-one constraint. However, it can be solved by the semidefinite relaxation (SDR) technique [14] as explained in Set β 1 = β i 1 .

9:
end if 10: end for 11: Select β i 1 that achieves the minimal total power and the corresponding w * . Find w * 1 and w * 2 such that the following. First, we drop the rank-one constraint to obtain the relaxed SDP problem as follows The relaxed SDP problem in (34) can be solved conveniently by SDP solvers such as CVX [15]. Due to the relaxation, X * 1 obtained by problem in (34) might not be rank-one in general, however, can be solved by the rank-one decomposition theorem [16] given in the following lemma. Lemma 1 [14,Theorem 2.3]: Let G i , i = 1, ..., 4 be an n×n Hermitian matrix, and X be an n×n nonzero Hermitian PSD matrix. Suppose that n ≥ 3, if rank(X) ≥ 3, then one can find a nonzero vector x ∈ Range(X) such that G i xx H = G i X, i = 1, ..., 4. If rank(X) = 2, then for any y / ∈ Range(X), there exists x ∈ C n×1 in the linear subspace spanned by y and Range(X), such that According to Lemma 1, we can recover the rank-one solution w * that satisfies w H * w * = tr(X * 1 ) and w H * B i w * = tr(B i X * 1 ) for i = 1, 2, 3 without loss of optimality of the SDR. Finally, the proposed solution for (P1) is summarized in Algorithm 1.

IV. BEAMFORMING DESIGN FOR COOPERATIVE SCHEME
In the following, we solve the (P2) for the cooperative scheme, where the PU and SU's beamforming vectors w 1 , w 2 and the relay beamforming matrix at SU-Tx F should be jointly designed. However, (P2) is nonconvex due to the constraints in (20) and (21). Therefore we propose an iterative algorithm to solve (P2) efficiently based on the alternating optimization. In particular, we optimize w 1 and w 2 with fixed F and then solve F with fixed w 1 and w 2 . The process is iterated until convergence. In the following subsections, we detail the derivations.

A. Joint Users' Beamforming with given F
Given the relay beamforming matrix F, the optimization problem (P2) can be reformulated as the follow QCQP Similar to the approach in the last section, we define w [w H 1 w H 2 ] H to jointly design w 1 and w 2 . It can be shown that there exists an interference temperature constraint β 2 that the following problem has the same optimal value as problem in (41), where By introducing X 2 ww H and using the SDR technique, the problem can be equivalently rewritten as After solving the above problem, we use Lemma 1 to recover the rank-one solution w * with given β 2 for the case rank(X * 2 ) > 1.

B. Relay Beamforming Matrix F with Given w 1 and w 2
Given the w 1 and w 2 , the optimization problem for F is formulated as a QCQP: which can be further expressed as where where f vec(F), By introducing X 3 = ff H and using the SDR technique, the above problem can be reformulated as For the case that X * 3 is not rank-one, the optimal rank-one solution of the problem in (69) can be recovered by Lemma 1 without loss of optimality.
Finally, the above proposed solution for (P2) is summarized in Algorithm 2. t = t + 1.

V. NUMERICAL RESULTS
In this section, we carry out simulations to evaluate the performance of our cooperative scheme and underlay scheme. We assume that the small-scale fading in each link follows independent Rayleigh distribution and the large-scale fading on each link is modeled by the path loss model as α i,j = c · d −n i,j , where d i,j denotes the distance between i ∈ {PU-Tx, SU-Tx} and j ∈ {PU-Rx, SU-Rx}, c is the attenuation constant set to be 1 and n is the path loss exponent set to be 3. Throughout this paper, we consider a system topology where the PU-Tx, PU-Rx, SU-Tx and SU-Rx are placed at (−0.5, 0), (0.5, 0), (0, 0) and (0, 0.5), respectively. The noise power σ 2 is set to be 1.
In Fig. 2, the total power consumption is plotted as a function of Q s , where N p = 4, N s = 2. Two different primary secrecy rate requirement with Q p = 0.5bit/s/Hz and Q p = 2.5bit/s/Hz are simulated for each scenario. It can be first observed that with the increase of Q s , the total consumed power of the system for all schemes increases to satisfy the SU's requirement. In addition, it can be shown that for both Q p = 0.5bit/s/Hz and Q p = 2.5bit/s/Hz scenarios, the underlay scheme outperforms the cooperative scheme. This  indicates that under the considered scenarios, the cooperation with an untrusted SU may be unsafe since SU is capable to eavesdrop more confidential message from PU-Tx. Moreover, one can also observe that with the increase of Q p or Q s , the gap between underlay scheme and cooperative scheme becomes larger. Fig. 3 demonstrates the total power consumption versus the number of antennas of the SU-Tx N s for both schemes, where we fix Q p = 2bit/s/Hz and Q s = 2bit/s/Hz with different number of the PU-Tx's antennas N p . It is first observed that given N s , both schemes with larger N p performs better. An interesting observation is that with the increase of N s , the total power consumption for the cooperative scheme first decreases to the optimal point (when N s = 3) and then increases sharply when N s becomes closer to N p . The reason is that, with greater spatially diversity gain provided by more antennas, the SU can consume less power for both relaying the PU's information and transmitting its own message. However, when N s becomes greater than 3, the SU becomes much more capable of eavesdropping PU's confidential message. Thus, the PU and SU have to consume much more power to guarantee the PU's required secrecy rate. It is also shown that the underlay scheme has better performance as N s become larger.

VI. CONCLUSIONS
In this paper, we studied a CRN in the presence of an untrusted SU with the aim of minimizing the total transmit power while satisfying the requirements of both PU and SU. The underlay scheme and the cooperative scheme were studied and we designed the corresponding joint beamforming for both schemes using suitable optimization tools. The simulation results showed that the underlay scheme outperforms the cooperative scheme, especially with high rate requirements and a large number of antennas at SU-Tx.