Joint Subchannel Pairing and Power Control for Cognitive Radio Networks with Amplify-and-Forward Relaying

Dynamic spectrum sharing has drawn intensive attention in cognitive radio networks. The secondary users are allowed to use the available spectrum to transmit data if the interference to the primary users is maintained at a low level. Cooperative transmission for secondary users can reduce the transmission power and thus improve the performance further. We study the joint subchannel pairing and power allocation problem in relay-based cognitive radio networks. The objective is to maximize the sum rate of the secondary user that is helped by an amplify-and-forward relay. The individual power constraints at the source and the relay, the subchannel pairing constraints, and the interference power constraints are considered. The problem under consideration is formulated as a mixed integer programming problem. By the dual decomposition method, a joint optimal subchannel pairing and power allocation algorithm is proposed. To reduce the computational complexity, two suboptimal algorithms are developed. Simulations have been conducted to verify the performance of the proposed algorithms in terms of sum rate and average running time under different conditions.


Introduction
With the emergence of wireless services and applications, the demand for spectrum is increasing. However, experimental results have demonstrated that traditional fixed spectrum allocation schemes lead to inefficient spectrum utilization [1]. To improve the spectrum utilization, cognitive radio networks (CRNs) that allow the unlicensed secondary users (SUs) to share the licensed spectrum with the licensed primary users (PUs) have been proposed.
Based on whether the PUs are aware of the existence of the SUs, the dynamic spectrum sharing in CRNs can be divided into two categories. For the first category, the PUs are not aware of the existence of the SUs. The SUs are able to detect the available spectrums and then use them for their own data transmission if the interference to the PUs is not harmful. For the second category, the PUs leverage parts of its spectrums to the SUs in exchange for appropriate remuneration.
Recently, by exploiting the cooperative diversity, the cooperation technique has been incorporated into the CRNs [2,3]. Based on the above categories for the dynamic spectrum sharing, the cooperation in CRNs can be divided into two categories as well [4]. For the first category, the SUs are located in different areas and thus have different channel conditions. In this case, some SUs may be selected as relays to help forward other SUs' data [5][6][7][8][9]. It is named as cooperation among SUs. For the second category, the PUs lease some resources (time or frequency) to the SUs; thus the SUs will act as relays to forward the PUs' data. When the data of the PUs are completely transmitted or the data rate requirements of the PUs are satisfied, then the SUs can transmit their own data [10][11][12]. We call it cooperation among PUs and SUs. In this paper, we will consider the cooperation among SUs.
The resource allocation problem is significant for CRNs with cooperation among SUs. A typical feature of CRNs, which differs from other kinds of networks, is that the quality of service (QoS) of the PUs should be guaranteed by imposing interference power constraints on the resource allocation problem [13][14][15]. For the resource allocation problem in relay networks, the problem of power allocation and relay selection 2 The Scientific World Journal has been investigated in [16,17]. In particular, if wireless relay networks have multiple channels, for example, orthogonal frequency-division multiplexing (OFDM) relay networks, the resource allocation problem including the subchannel allocation and subchannel pairing has also been studied. The existing literature has shown that appropriate subchannel pairing has improved the network performance for not only the amplify-and-forward (AF) relay strategy but also the decode-and-forward (DF) relay strategy [18][19][20][21][22]. However, there have been very few studies devoted to the resource allocation problem with subchannel pairing in relay-based CRNs.
Some studies have investigated the resource allocation problem for the case that secondary relay helps SU's transmissions in CRNs. Resource allocation in the downlink transmission over a cluster-based cellular network was analyzed in [23], where relays were fixed and supposed to be able to help forward data from the base station to the SUs in its cluster. The formulated problem was an average weighted sum throughput maximization problem; then the dual decomposition method was used to derive an asymptotically optimal algorithm. The relay selection and power allocation problem has been investigated in [5,6]. The problems under consideration in [5,6] were formulated as optimization problems under the interference power constraint and the total power constraint; however, the network models were different. Li et al. [5] considered one channel in the model, but Bharadia et al. [6] considered multiple channels. Although there were multiple channels, the channel pairing problem was not considered in [6]. Meanwhile, the power constraint in [6] was the total source and relay power constraint. This constraint can give some insight for the power allocation but is not very suitable for modeling the practical networks where the source and the relay usually have their individual power supplies. Hence, individual source and relay power constraints are more appropriate for modeling the wireless relay networks in reality, and we will study the resource allocation under individual source and relay power constraint in this paper. Soury et al. in [7] studied the subchannel pairing, power allocation, and relay strategy selection (AF and DF selection) problem in CRNs. Although this paper considered subchannel pairing, the optimal subchannel pairing solution was not given. Sidhu et al. in [8] studied the joint subchannel pairing and power allocation problem for AF relay-based CRNs. Our paper is related to [8]. However, it should be noted that the network models in [8] and our paper are very different. To make the network model simple, the direct transmission link from the secondary source node to the secondary destination node is missing in [8], while both the direct transmission link and the relay transmission link are considered in our paper. From this point of view, the network model in [8] can be regarded as a special case of our model. Hence, the network model in our paper is more general than that in [8]. In addition, the proposed algorithms in [8] cannot be directly applied to solve the problem here. In Section 5.2, the performance comparison of the proposed algorithms in this paper and the optimal algorithm in [8] will be analyzed.
In this paper, we will investigate the joint subchannel pairing and power allocation problem in CRNs where a  SU is helped by a secondary relay with AF relay strategy. Both the direct transmission link and the relay transmission link are considered. Our objective is to maximize the SU's sum rate on all subchannels subject to individual power constraints at the source and the relay, the interference power constraints to the PU, and the subchannel pairing constraint. The problem is formulated as a mixed integer programming problem. We jointly optimize the subchannel pairing and power allocation by the dual decomposition method. To reduce the computational complexity further, two suboptimal algorithms are proposed as well. Simulation results show that the two suboptimal algorithms spend much less running time achieving sum rates that are close to the optimal solution under various simulation conditions. The remainder of the paper is organized as follows. Section 2 describes the system model and problem formulation. The optimal solution is proposed in Section 3. Two suboptimal algorithms with lower computational complexity are proposed in Section 4. Performance evaluation of the proposed algorithms is shown in Section 5, and Section 6 concludes the work.

System Model and Problem Formulation
Consider a network setting where a PU and a SU coexist, which is shown in Figure 1. The SU can adopt the available channels that are licensed to the PU for its own data transmission. It is assumed that the total available bandwidth that is licensed to the PU is Hz. The total bandwidth is divided into nonoverlapping subchannels each with / Hz bandwidth. Let N = {1, 2, . . . , } denote the set of subchannels. Since the SU may cause interference to the PU, relay-based transmission is adopted by the SU to reduce power; thus it can ease the interference to the PU. For simplicity, we will use source, relay, and destination to denote The Scientific World Journal 3 secondary source, secondary relay, and secondary destination in the following.
The channel gains of subchannel from the source to the destination and from the source to the relay are denoted by , and , , respectively, and those of subchannel from the relay to the destination are denoted by , . , , , , and , are the variances of the additive white Gaussian noises (AWGN) in the corresponding subchannels, respectively. It is assumed that perfect channel state information of each subchannel is known by a central controller. For notational brevity, let = , / , , = , / , , and = , / , . AF relay strategy is used by the relay. It is assumed that the time domain is equally divided into a number of time slots. The AF cooperative transmission is a two-time slot process. In the first time slot, the secondary source uses power , to transmit data on subchannel ; the secondary relay and destination can receive signal from it. In the second time slot, the relay amplifies the received signal and uses power , to forward it to the destination. At the end of the second time slot, the destination combines the received signals from both the relay and the source using the maximum ratio combiner. To improve the transmission rate further, subchannel pairing is considered. Let , denote the subchannel pairing in the two time slots. If subchannel in the first time slot and subchannel in the second time slot are paired, , = 1; otherwise , = 0. It is assumed that the signals transmitted on different subchannel pairings are different. The data rate (bps/Hz) for the cooperative transmission on subchannel pairing ( , ) is denoted by Li et al. [19] , = which is not jointly concave with respect to , and , . To facilitate the analysis in the following, it can be approximated by Such approximation has also been used in [19][20][21][22], and the approximation gap disappears as the signal-to-noise ratio becomes large.
To protect the PU's QoS, the interference to the primary destination should not be larger than the given threshold 1 and 2 in the first and second time slot, respectively, which can be expressed by where = , / , and = , / , and , and , are the channel gain from the source to the primary destination on subchannel and that from the relay to the primary destination on subchannel , respectively. , and , are the variances of AWGN on the corresponding subchannels. It should be noted that 1 and 2 might have the same value in practice if the interference tolerance level of the PU is a constant or the required QoSs of the PU are stable in a given time period. Here, we use 1 and 2 to describe a general relay-based CRN model, and the following results in the paper can be easily extended to the case where 1 = 2 .
We desire to study the subchannel pairing and power allocation problem to maximize the transmission rate of the SU under the source power constraint, the relay power constraint, the subchannel pairing constraint, and the interference power constraint. The problem under consideration can be formulated as follows: where 1 and 2 represent the individual source and relay power constraints; and are the total power at the source and the relay, respectively. 3 indicates that the consumed power on each subchannel at the source and the relay should be nonnegative. C4∼C6 are the subchannel pairing constraints. 6 reveals that the subchannel pairing indicator , is a binary variable. Combined with 6, 4 indicates that, for any subchannel in the second time slot, at most one subchannel in the first time slot can be paired with it, and 5 indicates that, for any subchannel in the first time slot, at most one subchannel in the second time slot can be paired with it. 7 is the interference power constraints to the primary destination.

Optimal Solution
Problem (5) is a mixed integer programming problem; it is generally difficult to obtain the optimal solution. Fortunately, when the number of subchannels goes to infinity, the dual gap between the primal problem and the dual problem goes to zero [24]; thus the dual decomposition method can be used to solve this problem.

4
The Scientific World Journal 3.1. Dual Problem. By introducing the nonnegative Lagrange multipliers = [ 1 , 2 , 3 , 4 ] to the constraints 1, 2, and 7, the partial Lagrange function can be expressed as Thus the dual problem is min ( ) where ( ) is the dual function and is given by 3, 4, 5, and 6.

Solution to the Dual Problem.
The dual function ( ) is not differential due to the discontinuity of the subchannel pairing variable , , and hence its gradient does not exist. Instead, the subgradient method can be adopted. The subgradient of ( ) is where , , , , and , are the solution to (8). We will discuss how to solve (8) in the following. Based on the subgradient of ( ), the update of the dual variable is given by where is the iteration number, ( ) is the step size at iteration , and [ ] + = max( , 0). If ( ) satisfies the diminishing step size rule, then by using the subgradient method in (10), is guaranteed to converge to the optimal [25].
Next, we will deduce the optimal subchannel pairing and power allocation, which is the solution to problem (8). Through some algebra operations, can be rewritten as To facilitate the calculation of the optimal power and subchannel pairing, 1 + 2 + 3 1 + 4 2 in (11) can be deleted without impact on deriving the optimal power allocation, and thus, can be expressed by where Taking the first-order derivatives of with respect to , and , and making them equal 0, then we get With (14) and (15), we obtain that at the optimal point The Scientific World Journal
(2) Subtract the smallest entry in each row from all the entries of its row.
(3) Subtract the smallest entry in each column from all the entries of its column.
(4) Draw lines through appropriate rows and columns so that all the zero entries of matrix are covered and the minimum number of such lines is used. (5) Test for optimality: (i) If the minimum number of covering lines is , an optimal assignment of zeros is possible and this algorithm finishes. (ii) If the minimum number of covering lines is less than , an optimal assignment of zeros is not yet possible, and then go to Step 6. (6) Determine the smallest entry not covered by any line. Subtract this entry from each uncovered row, and then add it to each covered column. Return to Step 3.
Algorithm 1: Hungarian method [27] for subchannel pairing. where To make sure ⩾ 0, ( 1 + 3 ) − ( 2 + 4 ) ⩾ 0. Substituting (16) into (15), then we get the optimal , and , shown as where Substituting , and , into (13), we get Since the aim of (8) is to get the maximal of , intuitively, the subchannel pairing solution can be determined by It should be noted that although (22) can guarantee that the constraint 5 holds, it cannot guarantee that the constraint 4 simultaneously holds. That is to say, the obtained , from (22) may correspond to a situation where more than one subchannel in the first time slot might be paired with the same subchannel in the second time slot, for example, the subchannel pairing solutions 1,3 = 1 and 2,3 = 1. As a result, the subchannel pairing obtained from (22) may be infeasible. To guarantee the subchannel pairing constraints 4, 5, and 6 are satisfied simultaneously, one naive method is the exhaustive search. However, its computational complexity is !, which is prohibitive from practical implementation, especially when the number of subchannels is large. In order to reduce the computational complexity without loss of optimality, we will employ the Hungarian method to solve the subchannel pairing problem.
Define matrix U = [ , ] × ; then the subchannel pairing problem is equivalent to an assignment problem. The rule is to pick up one and only one entry from each row and each column of U to make the sum of the picked up entries maximal. The Hungarian method with the computational complexity ( 3 ) can solve this kind of problem efficiently. The Hungarian method for subchannel pairing is described in Algorithm 1. The whole algorithm is shown in Algorithm 2, which is a joint optimal subchannel pairing and power allocation algorithm.
Although Algorithm 2 can get the solution to problem (5), it is observed from the simulation results that the source power constraints 1 with (3) and the relay power constraint 2 with (4) are hard to be satisfied with equality. Because (5) is a maximization problem with an objective function that is increasing with respect to , and , , thus, at the optimal point, at least one of the source power constraints 1 and (3) should be met strictly. And it also holds for the relay power constraints 2 and (4). Hence, the power obtained from Algorithm 2 should be scaled until at least one of the source power constraints 1 and (3) and at least one of the relay power constraints 2 and (4) are satisfied with equality.

Suboptimal Algorithm 1.
Suboptimal algorithm 1 is a joint fixed subchannel pairing and optimal power allocation algorithm. The subchannel pairing is predetermined; for example, subchannel in the first time slot is paired with subchannel in the second time slot, and thus, , = 1 and , = 0, ∀ , ∈ N and ̸ = . When the subchannel pairing is determined, the power allocation problem becomes much simpler than problem (6). And the dual decomposition method used in the previous section can be adopted here. It should especially be pointed that from the subchannel pairings , = 1 and , = 0, ∀ , ∈ N and ̸ = , it is known that , = 0 and , = 0, ∀ , ∈ N and ̸ = , and thus only , and , , ∀ ∈ N need to be calculated in each iteration. The total algorithm is shown in Algorithm 3.
Compared with Algorithm 2, this algorithm has similar iteration process as Algorithm 2 expect for two aspects. First, this algorithm does not need to calculate the subchannel pairing by the Hungarian method, but Algorithm 2 needs this. Second, this algorithm only needs to calculate the power , and , , ∀ ∈ N, but Algorithm 2 needs to calculate , and , , ∀ , ∈ N.
As in Algorithm 2, the power obtained by this algorithm cannot make the power constraints 1, 2, and 7 in (5) be satisfied with equality. Therefore, the same power scaling as Algorithm 2 will be used at the end of this algorithm.

Suboptimal Algorithm 2.
Suboptimal algorithm 2 is a joint optimal subchannel pairing and equal power allocation algorithm. The optimal subchannel pairing is calculated by the Hungarian method. For equal power allocation, both total power constraints and interference power constrains should be satisfied. This is achieved by first ignoring the interference power constraints and allocating the total power equally on each subchannel and then checking the interference power constraints and conducting some operations until the interference power constraints are satisfied. The iteration process of this algorithm is shown as follows, and the entire suboptimal algorithm 2 is described in Algorithm 4.
Step 1. Without the consideration of the interference power constraints (3) and (4), the total power is equally distributed to each subchannel; that is, , = / , , = / , ∀ ∈ N, ∀ ∈ N. Then the Hungarian method is used for the subchannel pairing.
Step 2. Based on the allocated power and subchannel pairing, the interference power constraints (3) and (4) will be verified. If the constraints (3) and (4)  Step 3. Reallocate the source and the relay power equally on all the subchannels and find the optimal subchannel pairing by the Hungarian method; then go to Step 2.
The comparisons of the optimal algorithm and two suboptimal algorithms are summarized in Table 1. From Table 1, it is evident that both suboptimal algorithms do not fully exploitthe potential of different channel conditions for network performance improvement since they carry out fixed subchannel pairing or equal power distribution on each subchannel that does not take into account different channel conditions, and thus they will result in sum rate reduction to some extent.
(2) Do optimal subchannel pairing by the Hungarian method.

Complexity Comparison.
For the optimal algorithm (Algorithm 2), in each iteration it needs 2 operations to compute , and , , respectively. Then, it needs 2 operations to calculate , . The complexity of the Hungarian method is ( 3 ). Hence, the total complexity of Algorithm 2 is (( 3 + 3 2 ) 1 ), where 1 is the iteration number of the subgradient method. It has been shown in [24] that 1 is a polynomial function with respect to the number of the dual variables that is four in Algorithm 2. For suboptimal algorithm 1, it needs to compute , and , in each iteration; thus, it requires 2 operations. The subgradient algorithm needs 1 iterations to converge; hence its total complexity is (2 1 ).
The suboptimal algorithm 2 needs 2 iterations to calculate the power distribution and subchannel pairing, where 2 is related to the values of Δ, 1 , 2 , , and . It needs 2 operations to calculate the power distribution on each subchannel. The Hungarian method with complexity ( 3 ) is used to calculate the subchannel pairing. Therefore, its overall complexity is ((2 + 3 ) 2 ).
It should be noted that the computational complexity of the optimal algorithm is higher than the suboptimal algorithm 1. Although it is difficult to compare the value of 1 and 2 , simulations in Section 5.2 reveal that suboptimal algorithm 2 has a lower complexity than suboptimal algorithm 1 in most scenarios.

Numerical Results.
In this subsection, simulation results are presented to illustrate the performance of the proposed algorithms compared with the joint optimal algorithm in [8], which is indicated by optimal algorithm in [8] in the following figures and tables.    Figure 3 illustrates the sum rates of the four algorithms versus the location of the relay. As the increase of , the distance between the source and the relay becomes longer, and the distance between the relay and the destination becomes shorter. Figure 3 shows that all the algorithms reach the highest sum rate when the relay is located at the center between the source and the destination. The sum rate of the proposed optimal algorithm is higher than those of the other three algorithms under nearly all the values of . When the relay is close to the source ( = 0.1) or the destination ( = 0.9), the gap between the sum rates of the proposed optimal algorithm and the proposed suboptimal algorithm 1 is very small, that is, less than 3%. The optimal algorithm in [8] always achieves the lowest sum rate compared with the proposed three algorithms in this paper. This is mainly because the optimal algorithm in [8] does not consider the direct transmission link while the proposed algorithms consider both the direct transmission link and the relay transmission link. Figure 4 illustrates the sum rate comparison of the algorithms when the number of the subchannels changes. We set = 150 m, = 0.5, = = 3W, and 1 = 2 = 0.15 W. As is evident from Figure 4, the sum rates of all the algorithms are increasing as the number of subchannels increases; that is because when the number of subchannels is large, there are big chances to allocate more power to the subchannel with higher channel gain, and thus, the total rate increases. Under different numbers of subchannels, the optimal algorithm always obtains a higher sum rate than the suboptimal algorithms and the optimal algorithm in [8], but the sum rates of the proposed two suboptimal algorithms are always very close to the optimal solutions; that is, the suboptimal algorithms 1 and 2 achieve more than 90% and  87% of the corresponding optimal solution, respectively. The sum rate of the optimal algorithm in [8] is always lower than that of the proposed optimal algorithm under different numbers of subchannels.
The computational complexity of the proposed algorithms is highly related to the number of subchannels as we analyzed in Section 5.1. To compare the computational complexity, we use Table 2 to show the average running time comparison of the algorithms when the number of subchannels changes. The simulation parameters of Table 2 have the same values as those in Figure 4. It is apparent from Table 2 that the proposed optimal algorithm and the optimal algorithm in [8] always need much longer average running time to obtain the final solution compared with the two suboptimal algorithms, but the running times of the proposed optimal algorithm and the optimal algorithm in [8] are also different. When the number of subchannels is 18, the running time of the optimal algorithm in [8] is nearly twice as much as that of the proposed optimal algorithm. Combined with the sum rate comparison in Figure 4, it is indicated that when the number of subchannels is larger than 10, the proposed optimal algorithm achieves a higher sum rate but with a much less running time compared with the optimal algorithm in [8]. In most cases, suboptimal algorithm 2 spends a little less time than suboptimal algorithm 1. From the simulation results of Figure 4 and Table 2, we conclude that the two proposed suboptimal algorithms can achieve near optimal solution with a significant average running time reduction. Figure 5 shows the sum rate of the algorithms versus the interference power threshold 1 ( 2 ). The parameters are = 150 m, = 0.5, = = 3 W, and = 14. It is apparent from Figure 5 that the sum rate is largely impacted by the value of 1 ( 2 ). When 1 is very small ( 1 ≤ 0.1), the sum rates of the four algorithms increase dramatically  as, the increase of 1 , that is, because the interference power constraints are the dominating constraints in this case. As 1 increases, the total power constraints gradually become the dominating constraints, and thus, the sum rates keep changing in a small region. The proposed optimal algorithm achieves a higher sum rate compared with the other three algorithms under different values of 1 . The ratios of the average sum rate achieved by suboptimal algorithms 1 and 2 to that achieved by the optimal algorithm are more than 88% and 80% under different values of 1 , respectively.
The sum rate versus the total power is illustrated in Figure 6. The parameters are set to be = 150 m, 1 = 2 = 0.15 W, = 0.5, and = 14. It is seen from Figure 6 that the two suboptimal algorithms 1 and 2 achieve solutions that are more than 91% and 87% of the optimal solution for different values of , respectively. The sum rate of the optimal algorithm [8] is always nearly the same as the suboptimal algorithm 2 when = ≤ 5 W, and it becomes much smaller than that of suboptimal algorithm 2 when becomes larger. The sum rate of all these algorithms increases as increases. However, the sum rate increase rate gradually becomes slower as increases. That is because, although  increases, the interference power constraints restrict the actual total power consumption on all subchannels.

Conclusion
In this work, we have considered the problem of subchannel pairing and power allocation in CRNs with the AF relay. The network model contains a PU and a secondary sourcedestination pair assisted by a secondary relay. The objective is to maximize the rate of the SU under the individual power constraints at the source and the relay and the subchannel pairing constraints. In order to protect the PU, the interference power constraints to the PU are also considered. The problem under consideration is formulated as a mixed integer programming problem. Via the dual decomposition method, we propose an algorithm that jointly optimizes the subchannel pairing and power allocation. To reduce the computational complexity, two suboptimal algorithms are proposed as well. The simulation result has shown that when the relay is located at the center between the source and the destination, the three proposed algorithms obtain the highest sum rate. It has also shown that the proposed suboptimal algorithms significantly reduce the average running time and 10 The Scientific World Journal achieve sum rates that are close to the optimal solution under different conditions. Therefore, the proposed suboptimal algorithms are very suitable for practical implementations where sum rate reduction can be tolerant to some extent. In the future, we will analyze the theoretical approximate ratio of the suboptimal algorithms to the optimal one and will investigate the performance of our proposed algorithms in the presence of imperfect channel state information.