Primary User Localization and Its Error Analysis in 5G Cognitive Radio Networks

It is crucial to estimate the location of primary users (PUs) for the development of cognitive radio networks (CRNs). Great efforts have been made in the past to develop localization algorithms with better accuracy but low computation. In CRNs, PUs do not cooperate with secondary users (SUs), which makes the localization task challenging. Due to this feature, received signal strength (RSS)-based PU localization techniques, such as centroid localization (CL) and multidimensional scaling (MDS), are the best candidates. However, most of the CL- and MDS-based PU localization methods consider omnidirectional wireless communication. Therefore, in this paper we propose a PU localization method which uses the RSS values at different sectors of the SU antenna, where a scoring strategy is applied to all the sectors to estimate the PU location. Two different scoring functions are proposed. Numerical results show that the proposed localization method is robust to PU locations and channel conditions. The proposed method is validated in terms of various network parameters, such as the number of SUs, beamwidth of the SU sectors, size of the grid, and placement of the PUs. Results show that increasing the number of SUs improve the localization accuracy due to an increased number of measurements. However, the localization accuracy degrades with an increase in the beamwidth of the SU sector because the faraway grid points also participate in the localization. The results are also compared with the conventional CL for PU localization. Compared with conventional CL, it offers a significant improvement in the performance.


Introduction
The radio spectrum is one of the most valuable resources in wireless communication systems. Therefore, to efficiently use the spectrum, dynamic spectrum access has been introduced by using cognitive radio networks (CRNs) [1][2][3][4]. The spectrum is available to unlicensed secondary users (SUs) when the licensed primary users (PUs) are not active or do not use the spectrum fully in time, frequency, and space domain [5]. Hence, the SUs utilize the available spectrum by sensing the spectrum in time, frequency, and space domain. The SUs are able to utilize the spectrum by using an overlay mechanism if it is in the coverage region of a PU; otherwise, it uses an underlay mechanism if it is outside of the PU coverage. In the past decade, research on spectrum sensing in CRNs has mainly focused on timeand frequency-based spectrum sensing, and few works exist on spatial spectrum sensing. However, the channel statistics between the PU and SU may not be perfect, and can lead to possible interference to the PU in time-and frequency-based approaches. Therefore, recently, there has been great interest in developing PU localization schemes where the location information of a PU can be of great benefit to provide spectrum-sensing in the spatial domain.
Although CRNs provide efficient use of the scarce RF spectrum, it introduces security issues, such as primary user emulation (PUE) attacks. In PUE, an attacker emulates the PU signals to deter the SUs from accessing the unlicensed spectrum. Various approaches were developed by the researchers to cope with PUE attacks [6][7][8][9][10]. For example, a localization-based approach was used in [6] to detect the PUE attack in the unused TV spectrum. Similarly, an analytical model was used in [7] to find the probability of detection for PUE in energy-based spectrum sensing. Moreover, a non-parametric and passive classification method was used in [8] to detect the emulated signal from a malicious user. Cooperative and non-cooperative detection schemes were proposed in [9] that are based on tapping the channel power between the transmitter and receiver. Morevoer, a multipath delay-based PUE detection mechanism was analyzed in [10]. Other techniques for PUE detection include the time difference of arrival (TDoA) approach to estimate the location of the PU transmitter [11]. Although the TDoA approach provides better accuracy, it requires tight synchronization between the transmitter and the receiver. Similarly, the angle-received signal-strength-based approaches were used in [12,13] to detect the PUE attack. Recently, a PUE detection mechanism for non-stationary PU was proposed in [14] by using the Kalman filter.
Besides the PUE detection in CRNs, localization of a PU in CRNs enable various applications, such as radio resource management in the space domain, efficient routing between the SUs without interfering the PUs, and reliable spectrum sensing [15]. There has been a great deal of attention in the past decade to develop localization techniques due to the increasing demand for location-based services. There are a number of applications which require location-based services (LBS), such as autonomous cars, emergency services, and public safety applications [16]. As the wireless communication networks have evolved from 2G to 5G, localization methods have also been improved significantly to meet the standards. The localization accuracy of 550 m was achieved in 2G wireless communication systems, while in 4G systems, the accuracy has been improved to tens of meters due to the time difference of arrival ranging. Moreover, the localization accuracy can be further improved to 10 m by using the assisted global navigation systems [17]. However, it is expected that the localization accuracy of 5G wireless communication systems will be in the range of 1 m to 10 m for outdoor scenarios, while the indoor localization accuracy is expected to be less than a meter [18]. Localization methods for cognitive radio networks (CRNs) can be broadly classified into range-free and range-based methods. Range-free methods do not require actual ranging between the PU and the SUs, and depend only on the connectivity information. The range-free localization methods are simple but have low accuracy. On the contrary, localization methods based on ranging are more accurate but have more complexity and cost. Hybrid range-based and range-free localization methods have also been proposed in [15,19,20] for PU localization in CRNs.
The features of 5G networks, such as ultra-dense networks, wide bandwidth, smart antennas, and device-to-device communication will provide high capacity, low delay, and energy-efficient communication. 5G networks are expected to consist of a huge number of heterogamous devices which may use the licensed frequency band or the unlicensed frequency band. Therefore, the 5G networks can benefit from the CRN concept to significantly increase the spectrum efficiency. However, it will also introduce new challenges, such as optimization of the coexistence of various systems and technologies. Furthermore, the wide bandwidth of the 5G networks is likely to be implemented by mmWaves, which requires small-sized directional antennas. Also, the nodes are expected to have smart antennas with the capabilities of multiple input multiple output (MIMO) techniques. Thus, these small-sized directional antennas can provide angle information of the arrived signal at the receiver which can be helpful for localization [21].
Motivation for this paper was how the use of directional sectorized antennas is becoming more widespread for different applications. These directional antennas can achieve longer transmission distance and better performance, since the transmission beam is focused to a specific direction. Therefore, such features of directional antennas should be considered for localization as well where most of the localization research is focused on omnidirectional wireless communication. Even though the cells are sectorized in cellular networks, for localization purposes, it is assumed that the antennas are omnidirectional [22].
The remainder of the paper is organized as follows. Section 2 presents related studies. In Sections 3 and 4, we present the system model and the proposed PU localization method, respectively. In Section 5, we analyze the localization error of the proposed method. Section 6 presents the numerical results to evaluate the performance of the PU localization method, and we compare the results with CL. Section 7 concludes the work, with a few remarks.

Related Studies
Based on the transmission capabilities of PUs and SUs, the research on PU localization in CRNs can be broadly categorized into the two following categories: • Omni-directional: There has been extensive research focusing on omnidirectional CRNs localization. Such omnidirectional localization methods estimate the location of a PU by using fingerprinting, trilateration, and multidimensional scaling-based estimation methods [15,19,20,[23][24][25][26]. The simplest PU localization method among all these methods is centroid localization (CL) [23], which averages out the coordinates of the SUs to estimate the PU location. CL is a very simple and range-free approach, but due to its center-biased nature, it cannot achieve high accuracy. Therefore, the CL has been modified to weighted centroid localization (WCL) in [24], such that the localization performance is improved by using the weighting strategies. The weighting strategies for WCL are based on the received power, where the accurate measurements are given more weight, and vice versa. Another variant of WCL was proposed in [27] which tries to find a good match between the measured power and the nearest value to that power in a database by using mean square error. In [15,19,20,26], multidimensional scaling-based network localization methods were used to estimate the location of SUs and PUs, where both range-based and range-free schemes are utilized. All of the aforementioned localization methods consider how both PUs and SUs are using omnidirectional antennas. However, a number of current applications require the use of directional antennas to achieve better performance and a long transmission distance.

•
Directional: Recently the work in [28][29][30][31] have shown that the use of directional antennas certainly reduces the localization error. In [31] the authors have investigated the impact of directional antennas on the localization performance of sectorized cellular networks. A directional of arrival (DoA)-based localization method for PU localization has been proposed in [29,30] where the SUs are equipped with multiple antennas. DoA measurements are estimated by using the multiple signal classification (MUSIC) method, and the Stansfield estimator is used to estimate the location of a PU. A joint DoA and received signal strength (RSS)-based PU localization method has been proposed in [28] which improves the localization performance, as compared to DoA-only and RSS-only methods.
In this paper, we investigate the problem of PU localization in CRNs in the presence of sectorized directional antennas at the SUs. We also analyze the error performance of the proposed method for two-dimensional PU localization. Moreover, the root mean square performance (RMSE) of the proposed method is compared to the conventional CL, where the results show that the proposed method is not center-biased and robust.

System Model
We considered a two-dimensional CRN setup, which consists of N SUs and a PU deployed in a square area of L × L m 2 , as shown in Figure 1. The two-dimensional location of i-th SU is denoted by l i = {x si , y si } and the location of the PU is denoted by l p = {x p , y p }. A central unit was considered, which collects the PU presence and absence information from the SU and estimates the location of the PU. This setup can be used to model different cellular network architectures, ranging from macrocells to femtocells [32,33]. The transmission of the PU is assumed to be omnidirectional, while the SUs are equipped with M-sector antennas where the RSS at each sector is characterized by the angular sector and path loss model. Based on the aforementioned network setup, the power received from the PU at the m-th sector of the i-th SU is given by where P t is the transmit power of PU, G t is the transmit antenna gain, ρ(d) is the path loss at distance d, and G R,M is the receive antenna gain, which depends on θ im (boresight angle) and φ im (angle of reception). Based the angle of reception, the receive antenna gain G R,M (θ im , φ im ) is defined as where [−φ 0 , φ 0 ] is the width of the sector. We assumed that the SUs were randomly distributed with a random orientation, where the propagation of signals was characterized by the distance-dependent path loss model. Therefore, the path loss from the PU at the i-th SU is given as where ρ(d 0 ) = 20 log 10 4πd 0 λ is the path loss in dBs at a reference distance of d 0 . η is the path loss exponent, λ is the wavelength, and S i is the shadowing effect which follows a zero mean normal distribution. It is assumed that the shadowing effect is independent across each SU.

Proposed PU Localization Method
We considered a square region with a side length of L m, and divided the whole area into A × A grids, where the resolution of each grid is L/A m. The SUs are uniformly distributed, where each SU has three-sector antennas with a beamwidth of 2π 3 . The orientation of each SU is random and follows a uniform distribution. The proposed localization method is summarized as follows: • In CRNs, the SUs carry out spectrum sensing to find out the existence or non-existence of PU signals in a specific channel. If the channel is idle, the signal received by the SUs is typically noise, but if the channel is busy, then the received signal consists of both the PU signal and the noise. An energy detection model is usually used in such a scenario to decide the presence or absence of the PU signal. The energy detection model consists of a binary testing hypothesis, with H 0 and H 1 for the PU's absence and presence, respectively. The binary hypothesis for the detection of a PU is defined as [34] H and where y is the received signal, w(k) is the additive white Gaussian noise (AWGN) with zero mean and σ 2 w variance, and s(k) is the PU signal with zero mean and σ 2 s variance. Mainly, the energy detection-based PU detection is characterized by the probability of detection (P d ) and the probability of false alarm (P f ). The test statistics for PU detection is a random variable with a probability distribution function (PDF) of the chi-square distribution. If the number of observations h is large, the PDF of the test statistics can be approximated by the Gaussian distribution-that is: Using the principle of constant false alarm rate (CFAR) [35], P f and P d are given as: and respectively, where γ is the threshold for decision, and Q(·) represents the Q-function. Each i-th SU at location l i = {x si , y si } detects the PU presence from the aforementioned test statistics.

•
The SUs then span the angle range of [−φ 0 , φ 0 ] to find the direction of the signal from the PU. To elaborate, once an i-th SU receives some power from a PU, then based on its bore-sight angle θ ik in the k-th sector, it determines the direction of the signal φ ik where φ ik lies between [−φ 0 , φ 0 ]. This phenomena is further illustrated in Figure 2.
Based on the above scoring strategies, the total number of grid points K are selected for the PU location estimation.

•
In the final step, a grid-based centroid localization method is used to estimate the PU location, which is given as:l where w a = p i −p min p max −p min , p min = min{p i }, and p max = max{p i }.

Localization Error Analysis
In order to analyze the error of the proposed PU localization method, the error is defined as e = [x p − x p ,ŷ p − y p ] T , wherex p andŷ p are the estimated coordinates of the PU. The estimated two-dimensional coordinates of PU defined in (11) can be written as: respectively. The squared error for the two-dimensional localization is defined as: then c ij is defined as c ij =x ixj +ý iýj . Arranging the values of c ij in matrix form as C =xx T +ýý T , where the dimensions ofx andý is K × 1. Now expressing the squared localization error in (12) in compact form as e 2 = W CW T W1W T , where W ∼ N (µ, σ 2 s I) and 1 is the matrix of ones. Vector µ represents the mean values of W with elements µ i = E[p i ] − p min , σ 2 s is the variance, and I is the identity matrix. The mean square error can be defined as E[ is the expectation operator. The expression for the expectation is extracted by using the moment generating function (MGF), which is given as where Tr(·) is the trace operator and ϕ(0, −t) is the combined MGF of A = Q T CQ andμ = Q T µ. Note that matrix Q is of the dimension K × K and satisfies the condition Q T Q = 1 (I+2t1) = D(t). Now, the MGF function can be expanded as: where | · | represents the determinant. Simplifying (14), we get: Note that |(I + 2t1)| = 1 + 2Kt, which yields The exponential terms can be expanded as follows: Substituting (17) in (16) yields the expression for joint MGF-that is: The expressions for Tr(A) andμ T Aμ in (13) are derived as follows: andμ where Z(t) = D(t)CD(t). By expanding Z(t), we get: Substituting (21) in the left-hand side of (20) yields: Combining the expressions for Tr(A) andμ T Aμ, we get By substituting (18) and (23) in (13), we obtain the final expression for the mean square error as follows:

Numerical Results
In this section, we perform numerous simulations to evaluate the performance of the proposed localization method. A 50 m × 50 m square area is considered where the area is divided into 11 × 11 grids with the resolution of 5 m, as shown in Figure 3. The location of PU is assumed to be [25 m, 25 m], and a set of SUs are randomly selected within the area, following uniform distribution. Here, we assume a 5G directional CRN setup, where the SUs are equipped with multiple directive antennas and are able to detect the PU signal. The SUs are equipped with three sector antennas with random orientation and beamwidth of 2π/3. Transmit power of the PU is set to 20 dBW, with path-loss exponents of 3 and 5, respectively. The shadowing effect is considered to be σ s = 0 dB and σ s = 10 dB, respectively. The performance metric for the proposed localization method is considered to be the root mean square error (RMSE), that is, RMSE = , where R is the total number of estimated PU locations andx pi ,ŷ pi is the two-dimension location of the PU for a single realization.  Figure 4a,b compares the performance of the proposed localization method with the centroid localization technique when the number of SUs are increased from 10 to 100. Note that increasing the number of SUs improves the RMSE performance up to a certain level, after which the RMSE remains stable and the performance improvement is not obvious. Surprisingly, the performance of the proposed PU localization method in Figure 4a,b follows the same pattern, which means that the proposed method is robust to the scenario settings, while the performance of the centroid localization method is highly affected by changing the scenario. Specifically, when the PU location is moved from the center to the edge, the performance of centroid localization is highly degraded due to the center-biased nature of these methods. Even though an increase in the number of SUs will not help to reduce the localization error, the proposed PU localization method is robust to the PU location as long as a sufficient number of SUs is available. The effect of the path-loss exponent has also been evaluated in Figure 4a,b, where the RMSE for centroid localization is large for a small value of η. Furthermore, the effect of shadowing σ s was tested in Figure 4c,d for two different PU locations. Note that the proposed PU localization method is more robust to the shadowing effects as compared to the centroid localization methods. In Figure 5a, the impact of SU sectors is investigated for two different PU locations. Figure 5a shows that reducing the sector size improves the localization accuracy, because the closer grid points to the PU have been selected for final position estimation. Additionally, the impact of PU location is also shown in Figure 5a, where the location of the PU in the center (at [25 m, 25 m]) of the network is estimated with better accuracy as compared to the PU located at [40 m, 10 m]. Furthermore, Figure 5a shows that increasing the sector beamwidth up to 2π results in the conventional CL technique.
Since the grid-based localization algorithms strongly depend on the size of the grid, we evaluated the performance of the proposed method with five different grid sizes, as shown in Figure 5b. The simulation parameters for the results in Figure 5b consists of a PU located at [25 m, 25 m], where number of SUs are 10, η = 3, and σ s = 10 dB. Figure 5b shows that the smaller grid size results in better localization accuracy, because closer grid points are selected to localize the PU. However, reducing the size of the grid can significantly increase the complexity of the network. Also, it is shown in Figure 5b that the proposed localization method outperforms the CL method due to the use of directional antennas to select the grids near to the PU.

Conclusions
In this paper, we have proposed a grid-based PU localization method where the SUs are equipped with the sectorized antennas. Different scoring functions were introduced, where the location of the PU was estimated by the grids with highest score function. Moreover, for the theoretical analysis, the expression for mean square error of the proposed method was derived. Furthermore, the RMSE of the proposed localization method was compared with the CL method under different simulation setups, where the results show that the proposed method has better localization accuracy and is robust to the scenario settings.