- Research
- Open Access
- Published:

# On the performance of bi-directional cognitive radio system with network coding at the physical layer

*EURASIP Journal on Wireless Communications and Networking*
**volume 2013**, Article number: 242 (2013)

## Abstract

Recently, a variant of network coding at the physical layer named wireless network coding (WNC) has gained much attention due to it’s simplicity and capacity improvement of a bi-directional link. In this paper, we design and analyze a bi-directional cognitive radio (CR) system with multiple pairs based on WNC while taking into account the imperfect spectrum sensing and interference from/to the CR system. In addition, we design a resource allocation framework consisting of a subcarrier allocation strategy with different priority assignments and optimal power allocation algorithm. We show that the quality of service within the CR system highly depends on a proper design of the spectrum sensing process to minimize the probability of missed detection, while the spectrum efficiency of the CR system increases with the number of pairs within the system to which we assign priorities.

## 1 Introduction

A limited frequency spectrum is becoming a major problem to accommodate demands of new broadband wireless Internet services such as video streaming, video conferencing, and network gaming. Governmental agencies regulate and assign available radio spectrum based on fixed assignment policy. However, this does not guarantee that the allocated spectrum is efficiently utilized (the utilization of spectrum variates from 15% to 85%[1]). To solve this problem, a cognitive radio (CR) was proposed[2], where the spectrum not used by primary users (PUs) is allocated to secondary users (SUs).

Recently, relay-assisted communication has been regarded as the promising solution to improve the throughput of the CR system[3, 4]. A bi-directional CR system[5, 6] with multi-antenna relay was presented to improve the spectrum efficiency while keeping the interference towards the PUs in tolerable limits in the case of frequency flat fading channels. However, heavy computational load (at relay) and a limited number of SUs (i.e., two) make the bi-directional CR system with multi-antenna relay impractical. Moreover, the interference from the PUs towards the SUs and imperfect spectrum sensing, which may severely affect the performance of the CR system, have not been considered in[5, 6]. Therefore, more efficient bi-directional protocols for the CR system should be investigated.

To further improve the network capacity of a bi-directional link, a variant of network coding at physical layer (i.e., wireless network coding (WNC)) has been proposed[7]. Bi-directional multiple-antenna relaying with physical layer network coding has been studied[8–11], while distributed Alamouti space-time coding for single-antenna two-way relay networks has been proposed in[12]. In WNC protocol, the transmission is done in two orthogonal time stages. During the first stage (i.e., multiple-access phase), both users simultaneously transmit towards the relay, while during the second stage (i.e., broadcast phase), the relay forwards the received signal back to the users with amplify-and-forward protocol. Thus, a simple implementation of WNC protocol in addition to the capacity improvements makes the application of WNC to the CR system with multiple SU pairs worth investigating.

In this work, we design and analyze a bi-directional CR system with multiple SU pairs enabled by WNC while assuming imperfect spectrum sensing and interference from/to the CR system. We consider multiple SU pairs in the CR system to address the interference issues and resource allocation problem for different system scales. Firstly, we analyze the information rate of the CR system with multiple pairs and then theoretically evaluate the interference towards the PUs caused by simultaneous access of multiple SU pairs in the CR system. Secondly, we derive the closed-form symbol error rate (SER) and outage probability. Finally, resource allocation strategy (i.e., subcarrier and power allocation) for the bi-directional CR system with multiple SU pairs is developed with and without priority assignment. We design an optimal power allocation algorithm upon different priority assignment protocols so that the CR resources are efficiently utilized under restrictions towards the primary system (PS). Our theoretical results confirm the effectiveness of the bi-directional CR system employing WNC protocol with multiple SU pairs.

The rest of the paper is organized as follows: In Section 2, we present a network model, while a performance analysis is provided in Section 3. In Section 4, resource allocation strategy for the CR system with multiple SU pairs is developed. Numerical results and discussions are presented in Section 5. Conclusion is set out in Section 6.

## 2 Network model

We assume that the network consists of the PS and CR systems. In PS, *B* PUs communicate over the primary base station as illustrated in Figure1, while in the CR system, *K* SU pairs (*K* ≥ 1) communicate over a single-antenna CR base station (CR-BS). For the *k* th (*k* = 0 ∽ *K* - 1) SU pair (SU_{0,k}, SU_{1,k}), their coverage area includes the CR-BS, but they are out of each other’s coverage area as shown in Figure1. Thus, there is no direct link between the SU_{0,k} and SU_{1,k} for *k* = 0 ∽ *K* - 1.

### 2.1 Radio access protocol

In conventional approach, a bi-directional communication in the CR system is done using either time division multiple access (TDMA), frequency division multiple access (FDMA), or code division multiple access (CDMA). Without adaptive or dynamic frequency reuse, TDMA and FDMA have lower spectrum efficiency in comparison with CDMA. However, the problem with CDMA is a multi-access interference which increases together with the number of SU pairs and consequently limits the system performance.

Communication protocol for the bi-directional CR system with WNC protocol, in which both SUs of the given pair access the same spectrum at the same time, is done over multiple time slots, as shown in Table1. In the pre-stage, CR-BS identifies unoccupied spectrum and allocates them to the pairs of SUs. Then, in the first stage, all SUs simultaneously transmit their signals to the CR-BS, while at the second stage, the received signal at the CR-BS is broadcasted toward users using amplify-and-forward protocol. Finally, the detection is done.

### 2.2 Spectrum sensing

In our CR network, spectrum sensing is done periodically at CR-BS during the pre-stage. Spectrum sensing can be performed in each cycle of the communication protocol or less frequently depending on the PU traffic. We assume that the CR-BS receives information on the PS traffic mode via backhaul link from primary BS and decides how frequently spectrum sensing will be done.

The analyzed spectrum consisting of *N* subcarriers is a subject to energy detection approach, where the received signal energy is measured over the observation time to obtain the *i* th (*i* = 0 ∽ *N* - 1) subcarrier average energy$\mathcal{O}(i)$. The average signal energy$\mathcal{O}(i)$ is then compared to the predefined energy threshold *λ*. As a result of this test, a decision between two possible hypotheses is made: (a)${\mathcal{H}}_{0}$ if$\mathcal{O}(i)\le \lambda $, denoting that the PU is not active at the *i* th subcarrier, and (b)${\mathcal{H}}_{1}$ if$\mathcal{O}(i)>\lambda $, denoting that the PU is active at the *i* th subcarrier. Now, the set denoting the idleness of the analyzed subcarriers is obtained as *ξ*(*i*) = 1(0) if${\mathcal{H}}_{0(1)}$ for *i* = 0 ∽ *N* - 1. Because of the imperfection of spectrum sensing, some of the detected unoccupied (i.e., white) subcarriers may be used for primary transmission causing interference to the CR system. Thus, in the presented system, the performance of the energy detector is further described with the probability of missed detection by detecting the hypothesis${\mathcal{H}}_{0}$ instead of${\mathcal{H}}_{1}$. The probability of missed detection is given by$\delta =\text{Prob}\{{\mathcal{H}}_{0}|{\mathcal{H}}_{1}\}$ and is closely related to the probability of the correct detection given by 1-*δ*. Moreover, when multiple SU pairs access to white subcarriers, the CR system becomes more sensitive due to enhanced inter-pair interference within the CR system.

The set of all analyzed subcarriers **Ψ** = {*i* |*i* = 0 ∼ *N* - 1} is divided into disjoint sets: (a) white subcarriers **Ψ**_{
w
} and (b) occupied subcarriers **Ψ**_{
o
}, given by **Ψ**_{w(o)} = {*i* |*ξ*(*i*) = 1(0)} for *i* = 0 ∼ *N* - 1. Finally, the communication protocol is initiated over the selected set of white subcarriers.

### 2.3 Cognitive radio access with WNC

The data-modulated symbol sequence of the *j* th user in the *k* th pair SU_{j,k} is represented by {*d*_{j,k}(*i*); *i* = 0 ∼ *N* - 1} for *j* ∈ {0,1} and *k* = 0 ∽ *K* - 1. Subcarriers assigned to the *k* th pair are kept active, while the rest of the subcarriers are deactivated. Then, the modified data-modulated symbol sequence is given by${\stackrel{~}{d}}_{j,k}(i)={d}_{j,k}(i)v(k,i)$, where *v*(*k*,*i*) = 1, if and only if the *i* th subcarrier is assigned to the *k* th pair (otherwise *v*(*k*,*i*) = 0). We avoid direct inter-pair interference by imposing that each white subcarrier can be assigned to the one pair at the time (i.e.,${\sum}_{k=0}^{K-1}v(k,i)\le 1$). Subcarrier assignment based on the SUs priority is done on the MAC layer and is further elaborated in Section 4. The modified data-modulated symbol sequence is then fed to an *N*-point inverse fast Fourier transform (IFFT) followed by an *N*_{
g
}-sample guard interval (GI) insertion. Finally, the corresponding signals are simultaneously transmitted by all *K* SU pairs over a multipath (i.e., frequency-selective) channel. We note here that at least *K* white subcarriers has to be detected in order to allow bi-directional communication between all *K* SU pairs. This condition is satisfied by choosing appropriate simulation parameters as described in Section 5.

The signal received at the *i* th white subcarrier in the CR-BS at the first stage can be expressed as

where *P*_{j,k}(*i*) denotes the power emitted by the *j* th user of the *k* th SU pair over the *i* th white subcarrier. The first and the second terms in (1) denote the useful signal component from all pairs with${H}_{j,k}^{m}(i)$ being the channel gain between SU_{j,k} and CR-BS in the *m* th {*m* = 1,2} stage and the noise introduced by the PS in the *i* th subcarrier (which is assumed to be zero-mean Gaussian variable having the variance${\sigma}_{i}^{2}=\chi {\delta}^{2}{\sigma}^{2}$, with *χ* being the real positive number). *J*_{
r
}(*i*) is the sum of many random variables; each of which represents an interference term caused by PU transmission over different subcarriers. These interference terms are a function of the channel coefficients which are assumed to be zero-mean Gaussian variables. According to the central limit theorem, the resulting random variable can be approximated as zero-mean Gaussian random variable[13]. The third and the fourth terms in (1) denote the inter-pair interference in the *i* th subcarrier with *ψ*_{j,k}(*i*) being the interference introduced by SU_{j,k} in the *i* th white subcarrier for *v*(*k*,*i*) = 0 and the noise whose elements are modeled as a zero-mean Gaussian variables with the variance *σ*^{2}. Before transmission, the signal received at CR-BS is multiplied by a normalization factor

and broadcasted by the relay as${\stackrel{~}{R}}_{r}(i)=\rho (i){R}_{r}(i)$.

At the second stage after GI removal and *N*-point FFT, the signal received at the SU_{j,k} is given by

where the first and the second terms, respectively, denote the useful signal component and the noise introduced by the PS in the *i* th subcarrier during the second stage. The third and fourth terms in (2) denote the inter-pair interference during the second stage with *θ*_{j,s}(*i*) being the interference introduced by SU_{j,s} at the *i* th white subcarrier for *v*(*s*,*i*) = 0 and the noise whose elements are modeled as a zero-mean Gaussian variables with the variance *σ*^{2}. SU_{j,k} removes the self interference[14] and then one-tap frequency domain equalization (FDE) is applied to obtain the decision variables as${\widehat{d}}_{j,k}(i)={\stackrel{~}{R}}_{j,k}(i){w}_{j,k}(i)$, where *w*_{j,k}(*i*) denotes the equalization weight given by${w}_{j,k}(i)={({H}_{\stackrel{\u0304}{j},k}^{1}(i){H}_{j,k}^{2}(i))}^{\ast}/|{H}_{\stackrel{\u0304}{j},k}^{1}(i){H}_{j,k}^{2}(i){|}^{2}$, with$\stackrel{\u0304}{j}\in \{0,1\}$, where the bar over the expression signifies the unitary complement operation (i.e., 'NOT’ operation) that performs logical negation of the value under the bar.

## 3 Performance analysis

Here, we analyze and discuss the design of the bi-directional CR system based on the analytical results. We first discuss, under uniform power allocation, the information rate and interference caused by SUs towards the PS as well as a single-pair closed-form SER and outage probability. The non-uniform power allocation scenario is considered in Section 4.

### 3.1 Information-theoretic performance: information rate

Unlike previous works[5, 6], where multiple-pair problem was not considered, here we derive the information rate of the bi-directional CR system with multiple SU pairs using WNC protocol while taking into account the probability of missed detection in spectrum sensing. In what follows, we assume that the channel remains the same throughout both phases (i.e.,${H}_{j,k}(i)={H}_{j,k}^{1}(i)={H}_{j,k}^{2}(i)$). The decision variables after equalization can be given as${\widehat{d}}_{j,k}(i)={\phi}_{j,k}(i)+{\varphi}_{j,k}(i)$ where

for *k* = 0 ∼ *K* - 1, where *φ*_{j,k}(*i*) and *ϕ*_{j,k}(*i*), respectively, denote the useful signal and the composite noise which is assumed to have Gaussian distribution. The mutual information rate between the sequence of uncoded input symbols {*d*_{j,k}} and the output sequence$\{{\widehat{d}}_{j,k}\}$ at the SU_{j,k} can be represented as

where$h({\widehat{d}}_{j,k})$ and *h*(*ϕ*_{j,k}), respectively, denote the differential and conditional differential entropy rates of the sequence {*d*_{j,k}}, with index being left out due to the simplicity. Differential entropy rate of the Gaussian random variable *X* is given by$h(X)=\frac{1}{2}{log}_{2}(2\pi \mathit{\text{eE}}\left[|X{|}^{2}\right])$, where *E*[·] and *e*, respectively, denote ensemble average operation and Euler’s number[15]. By substituting this into (4), the average mutual information rate is obtained as

where$C(x)=\frac{1}{2}{log}_{2}(1+x)$ and *γ*_{j,k}(*i*) denotes the signal-to-interference plus noise ratio (SINR) calculated using (3) as

where${\sigma}_{\text{tot}}^{2}={\sigma}^{2}(1+\chi {\delta}^{2})$ denotes the total noise variance. We note here that the inter-pair interference within the CR system is negligible in comparison with the noise introduced from the PS, and thus, in the derivation of the SINR expression, it has been left out.

### 3.2 Interference analysis

We analyze the interference introduced to the PS caused by bi-directional communication of SUs enabled by WNC in the CR system. Due to the property of WNC protocol, the interference will be introduced during both phases: (a) in multiple-access phase when both SUs of the *k* th pair transmit over the same white subcarriers and (b) in broadcast phase when the relay transmits over all white subcarriers. We note that in this section, we assume uniform power distribution among the white subcarriers throughout both phases. In addition, due to the imperfect spectrum sensing (i.e., incorrectly detected white subcarriers), SUs may transmit over the subcarriers which are used by PUs causing direct interference to the PS.

During the multiple-access phase, interference caused by the SU’s transmission over the *n* th white subcarrier to the *l* th occupied subcarrier is defined as

where *B* and *b*, respectively, denote the total number of PUs and the specific PU (*b* = 0 ∽ *B* - 1). *F*_{j,k,b}(*l*), *T*_{
s
}, and *d* denote the channel gain between the SU_{j,k} and *b* th PU in the *l* th subcarrier, the symbol duration, and the spectral distance between the *n* th white subcarrier and the *l* th occupied subcarrier given by *d* = |*n*-*l*|, in that order.

During the broadcast phase, only the relay transmits and consequently the interference caused by the relay’s transmission over the *n* th white subcarrier to *l* th occupied subcarrier is defined as

where *G*_{r,b}(*l*) and *P*_{
r
}(*n*), respectively, denote the channel gain between the relay and the *b* th PU in the *l* th subcarrier and the power at the relay emitted over the *n* th white subcarrier. We note here that we have taken into account the direct interference from PUs to the CR system due to missed detection in both multiple-access and broadcast stages. This interference term is analytically encapsulated with the first integral in (7) and (8).

Finally, the total interference caused by the SUs to the occupied subcarriers during the multiple-access and broadcast phases is given by

where *J*_{
m
}(*n*,*l*) denotes the interference caused by the SU’s transmission over the *n* th white subcarrier to the *l* th occupied subcarrier in the *m* th stage.

It is important to note here that the increased probability of missed detection will have a significant impact on the interference introduced to the PS especially during the broadcast phase, due to the relay’s larger covering area. However, using non-uniform power distribution at the relay, this interference can be controlled. This has been pointed out in Section 4.

### 3.3 Closed-form SER

We analyze the SER performance of the bi-directional CR system in which the pair of SU simultaneously access the same white subcarriers. To this end, we derive the closed-form SER expressions and discuss the system design with respect to derived expressions. Without loss of generality, we assume one pair of SUs (i.e., *K* = 1) and a uniform power distribution across all white subcarriers (i.e., *P* = *P*_{
r
}(*i*) = *P*_{j,k}(*i*)). The case with non-uniform power allocation will be investigated in the following section.

The SER for *M*-PSK modulation is given by[16]

where${\mathcal{M}}_{\gamma}(\xb7)$ denotes the moment generating function (MGF) and *g*_{PSK} = sin2(*π*/*M*). The MGF can be calculated as a Laplace transform of the probability density function (PDF).

The SINR expression can be rewritten as

where${\gamma}_{1}=P|{H}_{j}{|}^{2}/{\sigma}_{\text{tot}}^{2}$ and${\gamma}_{2}=P|{H}_{\stackrel{\u0304}{j}}{|}^{2}/{\sigma}_{\text{tot}}^{2}$ with *H*_{
j
} being the channel gain between the *j* th user and the relay. Let *V*_{1} = 1/*γ*_{1} and *V*_{2} = 2/*γ*_{2}; now, their PDFs are obtained as

where${\alpha}_{1(2)}=P{\mathrm{\Omega}}_{1(2)}/{\sigma}_{\text{tot}}^{2}$ with Ω_{1(2)} being the variance of the channel gains modeled as zero-mean complex Gaussian variables. The PDF of the random variable *Z* = *V*_{1} + *V*_{2} is given by${p}_{Z}(z)={\int}_{0}^{z}{p}_{{V}_{1}}(z-v){p}_{{V}_{2}}(v)\mathit{\text{dv}}.$

Using variable substitution *γ*_{j,k} ≈ *Z*^{-1}, the PDF of the *γ*_{j,k} can be calculated as

Now, by substituting (12) into (13), we obtain

and the MGF is represented as Laplace transform of$\phantom{\rule{2.77626pt}{0ex}}\phantom{\rule{2.77626pt}{0ex}}{p}_{{\gamma}_{j,k}}(\gamma )$ as

Using the expression${\int}_{0}^{\infty}x\phantom{\rule{0.3em}{0ex}}exp\phantom{\rule{0.3em}{0ex}}(-\mathit{\text{Ax}})\mathit{\text{dx}}={A}^{-2}$, for solving the inner integral in the last equation, the MGF can be represented as

where *a* = *α*_{1}, *b* = *α*_{2} - *α*_{1} + *s* *α*_{1}*α*_{2}, and *c* = -*s* *α*_{1}*α*_{2}. The solution to (16) can be obtained in closed form as[17]

which can be further simplified by restricting our observation for the high SINR and then the coefficients can be approximated as *b* ≈ *s* *α*_{1}*α*_{2} and *c* ≈ -*s* *α*_{1}*α*_{2}, obtaining the tight approximation as

Finally, substituting (18) into (10), a closed-form SER is given by

We observe that the final closed-form SER expression is a function of probability of missed detection, order of modulation level, and the variances of the channel gains between the SUs and the relay.

### 3.4 Outage probability

An important performance metric which reflects that the CR system will not be able to support a target quality of service (QoS) (i.e., SER) is known as an outage probability. The outage probability *P*_{out} at any given average received SINR is defined as the probability that the instantaneous SINR *γ*_{j,k} at SU_{j,k} is lower than the given threshold *γ*_{th} and is given by${P}_{\text{out}}=P\{{\gamma}_{j,k}<{\gamma}_{\text{th}}\}={F}_{{\gamma}_{j,k}}({\gamma}_{\text{th}}),$ where${F}_{{\gamma}_{j,k}}({\gamma}_{\text{th}})$ denotes the cumulative density function (CDF) of the random variable *γ*_{j,k}. To obtain the CDF, first we obtain the PDFs of the random variables *V*_{
i
} whose distribution is given by (12) and then the corresponding MGFs are calculated as

Using[17], the solution to a latter integral is given by

where${\mathcal{K}}_{1}(\xb7)$ denotes the first order modified Bessel function of the second kind. Due to the fact that *V*_{1} and *V*_{2} are independent random variables, MGF of the variable *Z* is given by${\mathcal{M}}_{Z}(s)={\mathcal{M}}_{{V}_{1}}(s){\mathcal{M}}_{{V}_{2}}(s).$ Now, from$\mathcal{L}\{p(x)\}=\mathcal{L}\{\frac{\mathit{\text{dF}}(x)}{\mathit{\text{dx}}}\}=\mathcal{M}(s)=\mathit{\text{sF}}(s)$, it follows that$F(x)={\mathcal{L}}^{-1}\{\frac{\mathcal{M}(s)}{s}\}$. Since *γ*_{j,k} = *Z*^{-1}, the CDF of *γ*_{j,k} can be expressed as

where *F*_{
Z
}(1/*x*) is given by${F}_{Z}(1/x)={\mathcal{L}}^{-1}{\{{\mathcal{M}}_{Z}(s)/s\}}_{y=\frac{1}{x}}$, and it can be represented as

Finally, by solving (23)[17] and substituting the solution into (22), the CDF (i.e., outage probability) of the random variable *γ*_{j,k} is obtained as

We observe that it is a function of the probability of missed detection; as the probability of missed detection increases, so does the outage probability and vice versa. Until now, we assumed uniform power allocation for all users. Below, we present the subcarrier and power allocation for the bi-directional CR system with multiple SU pairs.

## 4 Subcarrier and power allocation

Due to the limited available CR resources, the system performance heavily relies on resource allocation, including white subcarriers’ assignment among *K* SU pairs and optimal power allocation at relay. To this end, in this section, we design the subcarrier and power allocation for the proposed method.

We define our problem as maximizing the total throughput of the CR system using WNC protocol given the total available power budget at relay and interference limits towards the PS. Thus, the optimization problem can be defined as

where *J*_{th}, *P*_{tot}, and *I*(*P*_{
r
}(0),…,*P*_{
r
}(*N*-1), respectively, denote the interference threshold, the total available power at the relay, and the total throughput of the CR system given by$I({P}_{r}(0),\dots ,{P}_{r}(N-1))={\sum}_{j=0}^{1}{\sum}_{i=0}^{N-1}C({\gamma}_{j,k}(i))$, where *γ*_{j,k}(*i*) = *γ*_{j,k}(*P*_{
r
}(*i*)) denotes the SINR given by (6). Since the solution for (25) is not possible to obtain in closed form, we resolve to the iterative numerical methods. Before engaging into this iterative algorithms, we have to allocate the white subcarriers to the pairs of SUs. We note here that the optimal solution in (25) is computationally demanding, so we consider a suboptimal solution, where subcarrier and power allocation are done independently as follows.

### 4.1 Subcarrier allocation

Each white subcarrier is allocated to the one SU pair at most so that the direct inter-pair interference caused by simultaneous access of all SU pairs to the same white subcarrier is avoided. We note here that a pair of users transmit/receive over the allocated subcarriers throughout both phases (i.e., multiple-access and broadcast) and that the channel conditions between SUs and the relay are known to a network manager. Here, we consider two subcarrier allocation algorithms.

First, we consider a case when all SU pairs do not have the same priority; higher priority is given to the pairs with the best (i.e., highest) channel conditions. Consequently, it is not guarantied that all pairs will be served, but only the ones with the highest channel gains so that the average sum rate per pair is maximized. We refer to this algorithm as the best subcarrier allocation algorithm (BAA), since each white subcarrier is assigned to a pair having a maximum channel gain.

On the other hand, to deal with the service fairness in the CR system, we consider to allocate subcarriers fairly to all SU pairs. Thus, here, we assume that all SU pairs have the same priority. This is the case when the same QoS is guarantied for all pairs within the CR system. We refer to this algorithm as fair subcarrier allocation algorithm (FAA), and the algorithm flow is illustrated in Algorithm 1. For each white subcarrier, we sort in descending order all *K* pairs in respect to their channel gains. Then, a white subcarrier is assigned to the highest ranked pair in a sorted list in a way that at any moment the maximum difference between the pair with the most and least number of total allocated subcarriers equals to one. Below, we design an optimum power allocation algorithm based on the presented subcarrier allocation algorithms to maximize the throughput of the CR system for the given CR resources.

**Algorithm 1: FAA**

### 4.2 Power allocation

We can see that (25) represents a nonlinear problem with constraints, and it can bee easily reformulated into standard convex optimization problem as

where the Lagrangian function$\mathcal{L}({P}_{r}(0),\dots ,{P}_{r}(N-1),\eta ,\vartheta )=-I({P}_{r}(0),\dots ,{P}_{r}(N-1))+\mathcal{G}({P}_{r}(0),\dots ,{P}_{r}(N-1),\eta ,\vartheta )$ and$\mathcal{G}(\xb7)$ is the constrain function given by$\mathcal{G}({P}_{r}(0),\dots ,{P}_{r}(N-1),\eta ,\vartheta )=\eta \left({\sum}_{i=0}^{N-1}{P}_{r}(i)-{P}_{R}\right)+\vartheta ({J}_{\text{tot}}-{J}_{\text{th}}).$ Since (26) is a nonlinear convex optimization problem, a global solution can be found.

The algorithm flow is illustrated in Algorithm 2, where$\mathbf{C}({P}_{r}^{l}(0)\phantom{\rule{0.3em}{0ex}},\dots ,{P}_{r}^{l}(i),\dots ,{P}_{r}^{l}{(N-1)}_{r}^{l})={\left[{\sum}_{i=0}^{N-1}{P}_{r}^{l}(i)-{P}_{R};\phantom{\rule{2.22144pt}{0ex}}{J}_{\text{tot}}-{J}_{\text{th}}\right]}^{T}$ with${\mathbf{P}}_{r}^{l}$ being the relay power vector in the *l* th iteration given by${\mathbf{P}}_{r}^{l}=\left[{P}_{r}^{l}(0)\phantom{\rule{0.3em}{0ex}},\dots ,{P}_{r}^{l}(i),\dots ,{P}_{r}^{l}(N-1)\right]$, and **H**^{l} the Hessian matrix in the *l* th iteration. Algorithm is based on the sequential quadratic programming (SQP) procedure in which the search direction is updated in each iteration by solving the quadratic programming (QP) problem. For the solution of QP problem, we have used Broyden-Fletcher-Goldfarb-Shanno (BFGS) approximation of the Hessian matrix, while step size is updated using the backtracking line search[18]. With different subcarrier allocation algorithms, we evaluate the impact of the chosen priority policy on the total throughput of the CR system in the presence of power and interference constrains.

**Algorithm 2: Power allocation**

## 5 Numerical simulation and discussion

Using previously derived expressions, we evaluate the performance of bi-directional CR system with multiple SU pairs using WNC protocol through numerical simulation. We analyze the spectrum consisting of *N* = 256 subcarriers which is 80% used by the PUs. This means that in average there will be around 50 white subcarriers available for bi-directional communication in CR system. Since we consider up to *K* = 16 SU pairs in the CR system, there will be enough resources to allow all SU pairs to communicate. User’s powers are set to 10 dBm and additive white Gaussian noise (AWGN) variance to *σ*^{2} = 10^{-5}, while the variance of the noise due to missed detection${\sigma}_{i}^{2}$ is determined with parameter *χ* (i.e.,${\sigma}_{i}^{2}=\chi {\delta}^{2}{\sigma}^{2}$). As for the channel, we assume *L* = 16-path Rayleigh block fading channels with normalized variances for each time phase Ω_{1} = Ω_{2} = 1 and QPSK data modulation. We note here that we have used BAA for evaluating the information rate and the total interference towards the PS.

First, we evaluate the information rate of bi-directional CR system with multiple SU pairs. The information rate as a function of the relay power and probability of missed detection and a number of SU pairs as a parameter is shown in Figure2. We observe from the figure that for the given probability of missed detection, the information rate of the CR system may be increased as the number of SU pairs increases. In particular, for the missed detection probability of 10%, the information rate increases 0.65 bps/Hz for the relay power of 20 dBm which corresponds to increasing the SU pairs from 2 to 4. This is because the multiple-user diversity is exploited through subcarrier allocation leading to a higher information rate which is further enhanced through the increase of the total power at the relay.

Next, we evaluate the interference introduced to the PS by SUs with WNC protocol. Figure3 shows the interference normalized per subcarrier as a function of relay power, and probability of missed detection as a parameter, where we can observe that for the relay power above 15 dBm, interference intensively increases due to the high interference introduced during the broadcast phase. Thus, the interference introduced towards the PS largely depends on the power emitted by the relay, and by proper power distribution at relay it can be controlled.

Figure4 shows the SER performance as a function of the total average power with probability of missed detection and *χ* as a parameter. We observe that the probability of missed detection has the highest impact for achieving the target SER given the average power of the CR system. Because of this, it is very important to carefully design the spectrum sensing process to minimize the probability of missed detection (by choosing more accurate sensing equipment and algorithms) as it is the key design parameter to control the QoS in the CR system.

Figure5 shows the outage probability of CR system for the required *γ*_{th} = 3, as a function of the total average power with probability of missed detection and *χ* as a parameter. We observe that the outage probability is upper bounded in the case of an ideal spectrum sensing (i.e., *δ* = 0), and it is even more sensitive on imperfect spectrum sensing. Consequently, the CR system may not be able to support the target QoS (i.e., SER) if the parameters related to the spectrum sensing accuracy are not properly designed.

Finally, we consider non-uniform power distribution at the relay for different subcarrier allocation algorithms to keep the interference towards the PS below the defined threshold while maximizing the total throughput of the CR system. Figure6 shows the CR system’s information rate as a function of the total average relay power, where we observe inferior performance in the case of uniform priority assignment among SU pairs. This is because BAA provides a better initial conditions for power allocation procedure leading to a superior performance. Moreover, due to the intensified interference introduced to the PS during the second (i.e., broadcast) stage, increasing the power at the relay above 20 dBm does not cause corresponding improvement in information rate irrespective of the priority assignment.

## 6 Conclusion

In this paper, we designed and analyzed the bi-directional CR system with multiple SU pairs using WNC protocol while assuming imperfect spectrum sensing and interference from/to the CR system. We have shown that for achieving the target QoS, one must carefully design the spectrum sensing process to minimize the probability of missed detection. Moreover, we designed resource allocation framework for multiple pair CR system to optimize the WNC protocol and efficiently utilize the CR resources. We observed improvements of spectrum efficiency for large-scale CR system with priority assignments among different pairs.

## References

- 1.
Chen K-C, Prasad R:

*Cognitive Radio Networks*. New York: Wiley; 2009. - 2.
Mitola J, Maguire GQ: Cognitive radio: making software radios more personal.

*IEEE Pers. Commun. Mag*1999, 6(4):13-18. 10.1109/98.788210 - 3.
Zhang Q, Jia J, Zhang J: Cooperative relay to improve diversity in cognitive radio networks.

*IEEE Commun. Mag*2009, 47(2):111-117. - 4.
Ligata A, Gacanin H, Adachi F: On performance of bi-directional cognitive radio networks. In

*2011 17th Asia-Pacific Conference on Communications (APCC 2011), Sabah, October 2011*. Piscataway: IEEE; 2011:1-5. - 5.
Jitvanichphaibool K, Liang Y, Zhang R: Beamforming and power control for multi-antenna cognitive two-way relaying. In

*IEEE Wireless Communications and Networking Conference, 2009 (WCNC 2009), Budapest, April 2009*. Piscataway: IEEE; 2009:1-6. - 6.
Jiang D, Zhang H, Yuan D, Bai Z: Two-way relaying with linear processing and power control for cognitive radio systems. In

*2010 IEEE International Conference on Communication Systems (ICCS), Singapore, November 2010*. Piscataway: IEEE; 2010:284-288. - 7.
Katti S, Gollakota S, Katabi D: Embracing wireless interference: analog network coding. In

*ACM SIGCOM 2007, Kyoto August, 2007*. New York: ACM; 2007. - 8.
Eslamifar M, Chin WH, Yuen C, Guan YL: Performance analysis of two-step bi-directional relaying with multiple antennas.

*IEEE Trans. Wireless Commun*2012, 11(12):4237-4242. - 9.
Eslamifar M, Yuen C, Chin WH, Guan YL: Max-min antenna selection for bi-directional multi-antenna relaying. In

*2010 IEEE 71st Vehicular Technology Conference (VTC 2010-Spring), Taipei, May 2010*. Piscataway: IEEE; 2010:1-5. - 10.
Eslamifar M, Chin WH, Yuen C, Guan YL: Performance analysis of two-way multiple-antenna relaying with network coding. In

*2009 IEEE 70th Vehicular Technology Conference Fall (VTC 2009-Fall), Alaska, September 2009*. Piscataway: IEEE; 2009:1-5. - 11.
Chai CC, Yuen C: On two-way communications for cooperative multiple source pairs through a multi-antenna relay. In

*2010 Asilomar Conference on Signals, Systems and Computers (ASILOMAR), Pacific Groove, November 2010*. Piscataway: IEEE; 2010:908-912. - 12.
Duong TQ, Yuen C, Zepernick H-J, Lei X: Average sum-rate of distributed alamouti space-time scheme in two-way amplify-and-forward relay networks. In

*2010 IEEE GLOBECOM Workshops (GC Wkshps), Florida, December 2010*. Piscataway: IEEE; 2010:79-83. - 13.
Papoulis A:

*Random Variables and Stochastic Processes*. New York: McGraw-Hill; 1991. - 14.
Gacanin H, Adachi F: Broadband analog network coding.

*IEEE Trans. Wireless Commun*2010, 9(5):1577-1583. - 15.
Haykin S:

*Communication Systems*. New York: Wiley; 2002. - 16.
Simon MK, Alouini M-S:

*Digital Communication over Fading Channels: A Unified Approach to Performance Analysis*. New York: Wiley; 2000. - 17.
Gradshteyn IS, Ryzhik IM:

*Table of Integrals, Series and Products*. San Diego: Academic; 2000. - 18.
Boyd S, Vandenberghe L:

*Convex Optimization*. Cambridge: Cambridge University Press; 2004.

## Acknowledgements

This study was supported in part by the 2010 KDDI Foundation Research Grant Program.

## Author information

## Additional information

### Competing interests

The authors declare that they have no competing interests.

## Authors’ original submitted files for images

Below are the links to the authors’ original submitted files for images.

## Rights and permissions

**Open Access** This article is distributed under the terms of the Creative Commons Attribution 2.0 International License (https://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

## About this article

#### Received

#### Accepted

#### Published

#### DOI

### Keywords

- Cognitive Radio
- Power Allocation
- Outage Probability
- Primary System
- Cognitive Radio System