Second order Kalman filtering channel estimation and machine learning methods for spectrum sensing in cognitive radio networks

We address the problem of spectrum sensing in decentralized cognitive radio networks using a parametric machine learning method. In particular, to mitigate sensing performance degradation due to the mobility of the secondary users (SUs) in the presence of scatterers, we propose and investigate a classifier that uses a pilot based second order Kalman filter tracker for estimating the slowly varying channel gain between the primary user (PU) transmitter and the mobile SUs. Using the energy measurements at SU terminals as feature vectors, the algorithm is initialized by a K-means clustering algorithm with two centroids corresponding to the active and inactive status of PU transmitter. Under mobility, the centroid corresponding to the active PU status is adapted according to the estimates of the channels given by the Kalman filter and an adaptive K-means clustering technique is used to make classification decisions on the PU activity. Furthermore, to address the possibility that the SU receiver might experience location dependent co-channel interference, we have proposed a quadratic polynomial regression algorithm for estimating the noise plus interference power in the presence of mobility which can be used for adapting the centroid corresponding to inactive PU status. Simulation results demonstrate the efficacy of the proposed algorithm.


Introduction
The enormous growth of wireless communications has created an ever increasing demand for frequency spectrum. Consequently, pressure is being mounted on the service providers to meet the end users' requirement for higher bandwidth. The existing policies governing spectrum management are however, based on static spectrum allocation for a specific technology and service [1]. According to this static spectrum allocation policy, the systems are bound to operate within the assigned frequency band which often results in under-utilization and scarcity of the limited wireless spectrum [2,3]. The wastage is owing to the fact that when there is no transmission, the assigned frequency bands remain idle. Several studies and measurements have been conducted around the world regarding spectrum utilization. The results point to the fact that spectrum utilization is concentrated only on certain portions of the allocated spectrum. Besides, a significant portion of the allocated spectrum remains unutilized while a considerably large portion is used occasionally [4]. A paradigm shift from static spectrum allocation currently being practiced to dynamic spectrum access is required [5]. Hence, the problems of under-utilization and spectrum scarcity have received a lot of attention in the global research community. Novel techniques for optimising spectrum usage are also being proposed to provide the urgently required panacea for addressing the problem of the unprecedented demand for spectrum access [6]. Mitola et. al. in [7] and [8] proposed the concept of cognitive radio (CR) as an effective solution to the problem of under-utilization and scarcity of the wireless spectrum. A CR is an intelligent radio device that can reason and adapt itself to the changes in activities within its radio frequency (RF) environment. It can autonomously detect which communication channels are in use and which are not, quickly migrate into the vacant channel while avoiding the occupied ones. Upon finding a vacant band to use in an opportunistic manner, it is required that a CR quickly vacates such band immediately the original assignee returns. The CR technology would enable wireless devices to efficiently utilize the spectrum in a dynamic manner. The users in the CR network can be categorized into two, namely; primary users (PUs) and secondary users (SUs). The PUs are the licensed users that have the right to use a specific portion of the spectrum, and the SUs are the unlicensed users that use the spectrum allocated to the PUs in an opportunistic manner, without causing harmful interference to the licensed users [5,9,10]. Spectrum sensing is the process through which CR devices are able to detect unused frequency bands in their RF neighbourhood. Thus, it is core to the successful implementation of the CR technology [9,11].
Over the years, a lot of techniques have been studied and proposed for achieving spectrum sensing. Most popular methods include energy detection, matched filter and cyclostationary feature detection. All these techniques involve the detection of PU activities solely by utilising observations made by the SU. It is evident from literature that the energy detection technique, which is a non-coherent detection method is the most widely adopted. This is because it is very simple to implement compared to other techniques and does not require prior knowledge of the PU signal. However, it performs poorly in shadowing and fading environment especially when PU operates at low signal-to-noise ratio (SNR) [12][13][14]. The matched filter based detector compares the PU's signal with a set of received signals in order to determine the presence or absence of the PU. Although, it is a very effective method for performing spectrum sensing, it requires that the SU has prior knowledge of the patterns in the PU's signal [9]. Cyclostationary detectors take advantage of the certain statistical properties that are inherent in the PU's signal which vary cyclically with time. These features also have a periodic statistics and spectral correlation that cannot be found in any interference signal or stationary noise. Thus, the method is effective for detecting the presence of the PU transmissions. As in the case of the matched filter, though, the scheme requires prior knowledge of the PU's signal patterns at the SU. Besides, the method would fail if the PU alters any of these properties without notifying the SU. Furthermore, to mitigate the problem of shadowing, cooperative sensing has been proposed whereby multiple SUs are deployed at different geographical locations to perform local sensing of the PU signal [15]. The scheme exploits the spatial diversity of the multiple nodes by combining the local sensing information to make an overall decision about PU activities [16,17].
It is noteworthy that CR devices need to be equipped with intelligence in order to be able to perform reasoning functionalities [5,18]. To this end, various machine learning (ML) schemes have been proposed to effectively address the problem of spectrum sensing. For example, in [19], the support vector machine, K-nearest neighbours, Kmeans clustering and Gaussian mixture model methods are proposed while the unsupervised scheme based on the variational Bayesian learning technique is presented in [17]. A comprehensive review of parametric and nonparametric learning methods previously proposed is provided in [20]. Of late, the deep learning methods based signal classification techniques have been considered in [21][22][23][24] and [25].

Motivations and related works
The capability of parametric ML methods to effectively address the spectrum sensing problem is demonstrated in [19]. However, the performance of these proposed schemes would be severely degraded in a built up area due to the slowly fading channel occasioned by the mobility of SUs in the presence of scatterers [17,26].
A consideration of existing literature shows that until now, there is dearth of study considering the deployment of these machine learning schemes in realistic scenarios involving the mobility of PU or SUs. In [27], the compromising effect of multipath fading and shadowing on the detection performance of spectrum sensing schemes was studied. In particular, overhead problem caused by the cooperation among SUs received attention and a reinforcement learning-based cooperative sensing scheme is proposed to address it. Also, in [28], the K-means clustering based learning method is proposed for enhancing the performance of cooperative spectrum sensing in generalized j À l fading channels. Furthermore, concern about nodes placement in ML based cooperative sensing schemes was addressed in [29].
This study considers scenarios involving mobile SUs operating under flat fading channel condition and investigates the deployment of parametric ML methods for spectrum sensing under these conditions. To address the attendant sensing performance degradation, a real time channel tracking and decision boundary updating strategy is developed.

Contributions
In this paper, extending our work in [26], we consider a CR network of mobile SUs and investigate the K-means clustering technique 1 in a non-cooperative sensing scenario. The K-means clustering algorithm like other similar machine learning algorithms for pattern classification lends itself readily to decision plane tracking by updating the clusters centroids. However, different from [26] where the approximation of the time-varying channel was based on the first order Kalman filter combined with a first-order auto-regressive model, we propose a pilot based secondorder (order-2) Kalman filter channel estimation technique for tracking the changes in the fading channel, and demonstrate the advantage within the context of spectrum sensing to improve the performance of the PU detection system. In addition, unlike the work in [26], no explicit cooperation is assumed between the PU and SUs. The second order Kalman filter yields a better approximation of the time varying channel [31,32]. Furthermore, in comparison with its higher order counterparts, the order-2 Kalman filter scheme requires estimation of fewer parameters. The main contributions of this paper are as follows: -We have addressed the problem of spectrum sensing by mobile secondary devices under Rayleigh fading channel condition and modeled the task of monitoring the ensuing channel as a real time channel gain tracking problem. A pilot based second order Kalman filter algorithm has been developed for addressing it. -Using the knowledge of the Kalman channel gain estimates, we have proposed a completely unsupervised (no cooperation from PU) K-means clustering technique for adapting the centroids according to channel variations and for making classification decisions on the fly. -As a beneficial mechanism for estimating the location dependent noise plus interference power in the presence of secondary users mobility, we have proposed a model for estimating the noise plus interference power that can be used to adapt the centroid corresponding to the inactive PU.
We quantified the performance of the tracker in terms of mean square error and tracking accuracy whereas the performance of the enhanced spectrum sensing scheme is evaluated in terms of average detection probability, probability of false alarm and receiver operating characteristics.
The remainder of the paper is organized as follows. In Sect. 2 we provide the system model and assumptions. The process for the feature vectors realization, clustering algorithm and pilot based second order Kalman filter fading channel tracker are described in Sect. 3. Section 4 explains the quadratic polynomial regression model for the estimation of noise plus interference power. Numerical results are discussed in Sect. 5 followed by conclusion in Sect. 6.

System model and assumptions
We consider a CR network consisting of a PU transmitter (PU TX ), PU receivers (P-Rx) and a decentralized system of SUs. The SU system has multiple clusters, each consisting of a secondary base station (SBS) and J mobile SU receivers as illustrated in Fig. 1.
The PU transmitter is assumed to alternate between the ON (active) and OFF (inactive) states and its transmission power is fixed. The secondary networks share the same frequency channel with the primary system and the SUs in each cluster are assumed to be cooperating to jointly sense the PU's activities. The essence of the joint sensing is to overcome the limitations caused by shadowing and to take advantage of the spatial diversity of the SUs. It is assumed that PU TX periodically broadcasts to the PU receivers pilot signals which capture the channel state information of the paths traversed by the PU signals [30]. The attributes of the pilot signals are assumed to be known to the SUs so that the SUs can estimate the slowly fading channel between the PU TX and the SUs during the training period. However, we assume there is no explicit cooperation between PU TX and SU network, hence spectrum sensing is performed in an unsupervised manner.
Our proposed learning process is accomplished in two stages. During the first stage, the SUs within a particular cluster are assumed relatively stationary. They estimate the energy received from the transmitted PU signal and collectively report these to their serving SBS. The SBS uses the energy feature vectors to perform K-means clustering and to obtain centroids corresponding to ON and OFF status of PU TX . Since there are only two clusters, it is reasonable to assume that the cluster with its centre closer to the origin corresponds to OFF status while the other cluster corresponds to the ON status. There is no need for the labels of PU transmission and hence, there is no explicit cooperation between PU and SU networks.
In the second stage, it is assumed that SUs make random walks and the channels between the PU and the SUs are treated as time-variant as the SUs move around in the presence of scatterers within the coverage area of the PU. Due to this mobility, as the underlying channel varies, the energy that is supposed to be received during the PU active status varies. Hence, the cluster centroid corresponding to ON status of PU TX is updated continuously with the aid of the proposed Kalman filter channel tracking algorithm, that is, we estimate the predicted channel coefficients of each moving SUs and compute the estimate of the received energy and update the K-means cluster.
If the instantaneous PU signal received by the j 2 J SU is represented by x j ðnÞ, the goal of the spectrum sensing is to decide between two hypotheses, namely; the PU is absent which corresponds to the hypothesis H 0 , and the PU is present which corresponds to the hypothesis H 1 . This can be expressed as where s(n) is the signal transmitted by the PU, assumed to be an independent and identically distributed (i.i.d) process with zero mean and variance, E½jsðnÞj 2 ¼ r 2 s . The parameter c j ðnÞ is the non-frequency-selective channel coefficient between the PU and the j th SU which is assumed to be Rayleigh distributed. However, we estimate this parameter at every block interval using pilot signals. Hence, for the purpose of channel estimation, at every block interval, c j is treated as deterministic, but it is assumed to vary according to a Rayleigh distribution between the blocks. Finally, g j ðnÞ is an i.i.d circularly symmetric complex zero-mean additive white Gaussian noise (AWGN) with variance, E½jg j ðnÞj 2 ¼ r 2 g and E½: denotes the expectation operator.
3 Features realization, clustering algorithm and fading channel tracker

Energy vectors realization for SUs
During the learning interval, it is assumed that the PU alternates between H 0 and H 1 . So, the normalized energy estimated at j th SU node is given as where N s is the total number of samples taken during the observation window.
The energy feature, / j is a random variable whose probability density function (PDF) follows a central Chisquare distribution under H 0 and a non-central Chi-square distribution conditional on the channel gain under H 1 , both with 2N s degrees of freedom [33][34][35]. Furthermore, when N s is large enough (say, N s ' 250) [35], under H 0 this PDF can be approximated as Gaussian via the central limit theorem with mean, l 0 = r 2 g and variance, 17]. Similarly, the distribution of / j under H 1 and with large N s can be approximated as Gaussian with mean, l 1 = jc j j 2 r 2 s þ r 2 g and variance, When Kalman gain is used for estimating energy, we estimate the energy as where P Tu is the PU transmission power. For constructing energy clusters, Z energy samples, / j are collected and reported to the serving SBS by each of the cooperating SUs. The set of energy vectors obtained at the SBS from all SUs during the clustering period is represented by S ¼ f/ 1 ; :::; / Z g where / z 2 R M , z 2 Z and M J is the corresponding number of collaborating SUs. We employ Kmeans clustering that clusters the set S of energy vectors / z to two classes H 1 and H 0 . The centroid that is closer to the origin is deemed to be the centroid for H 0 and the other one

The K-means clustering algorithm
The K-means clustering algorithm partitions a set of data into K disjoint clusters. In our case, K is 2 and the algorithm aims to minimize the measure between the centroids of the clusters and the given set of data by iteratively assigning the data into the cluster with the closest centroid. The end result of the K-means algorithm is a set of clusters that are tightly packed and well-separated for every group.
Let S ¼ f/ z g Z z¼1 2 fH 1 ; H 0 g be the set of energy feature vectors obtained using (2). Also, let C k denote the set of training energy vectors that belong to cluster k which has a centroid h k defined as the mean of all the training energy vector in C k : S ¼ fC k g K k¼1 . According to [36], the Kmeans algorithm aims to obtain K clusters which minimize the within-cluster sum of squares as where card implies the cardinality function. The clustering algorithm in (4) is employed at the SBS to derive the required clusters' centroids. A generalized pseudo-code for implementing (4) is provided in Algorithm 1. The cluster centroid corresponding to H 0 can be identified as where h 0 is a zero vector, 0 2 R M representing the origin of the clusters' plane. It should be noted however, that when mobility of SUs is considered, the centroids obtained under H 1 must be continuously updated for reliable detection of PU's activities. In the Sub-Sect. 3.3, we describe a Kalman filter based scheme for tracking the gradual changes in PU-SU channel which would facilitate ''on the fly'' updating of the centroid-based decision plane for our spectrum sensing system.

Fading channel model and estimation
We consider the mobility of SUs in heavily built-up areas resulting in the presence of scatterers in their RF operating environment. Our aim is to estimate the slowly varying channel gain between the PU transmitter and SUs which can be modeled as flat fading Rayleigh channel [31,37] using the second order Kalman filter tracker. Let the discrete-time observation at the mobile SU terminal be given by where n is the symbol time index, bðnÞ is a known modulated pilot signal periodically broadcasted by PU TX , cðnÞ is the complex Gaussian channel coefficient whose variance is r 2 c , gðnÞ is the zero mean AWGN at the receiver with variance r 2 g . The noisy measurement of the channel gain from the pilot at the SU isĉ.
Referring to (1) and ignoring the user index j, the magnitude of the instantaneous channel gain, a = jcðnÞj is a Rayleigh distributed random variable. The autocorrelation of the fading channel coefficient R a ½l is defined for lag l as where J 0 ðÁÞ is the zeroth order Bessel function of the first kind, r 2 a = r 2 c , f d is the Doppler frequency and T s is the symbol interval. For Kalman filter based channel estimation, in addition to the noisy observationĉ, an approximate state-space representation of the evolution of the channel gain is required. For the first order Kalman tracker approach described in [26], the state-space model is described by where 0\d 1 \1 and nðnÞ is the complex AWGN with variance, r 2 n = ð1 À d 2 1 Þr 2 a . However, in the current work, we propose to use the second order autoregressive model (AR 2 ) being a more suitable approximation to the fading channel in the estimation problem being considered [37,40].
The AR 2 model with Gaussian assumption which approximates the flat fading Rayleigh channel can be expressed as a difference equation of the form where the model coefficients, d 1 and d 2 are the first and second order autoregressive coefficients respectively, whose values are obtained by imposing the correlation matching criterion as [37] ð10Þ which may be further re-expressed as and The remaining parameter nðnÞ in (9) is the AWGN with variance, r 2 n and n remains the symbol index. According to the Kalman filter framework, the tracking equations can be separated into two parts. These are the prediction equations that implement the prediction stage by means of appropriately chosen models and the correction equations for correcting the errors and inaccuracies arising in the estimation process with the aid of the measurement received [43].
The prediction stage: In general, the prediction equation that models a system's process evolution takes the form of the first order linear difference equation expressed as [26] aðnÞ ¼ Aaðn À 1Þ þ BuðnÞ þ wðn À 1Þ ð 13Þ where the associated parameters can be initialized with A = d 1 , B = 0 and u(n) = 0 while wðn À 1Þ is the process white noise. The measurement equation for correcting errors in the prediction is also described by an expression of the form where H is the measurement model which maps the true state space into the observed space and v(n) is a random variable representing the measurement noise. In this work, we adopted (6) as a form of (14) to derive the required multiple sequential measurements while (9) was used as the prediction equation that models the dynamics of the slowly fading channel. Furthermore, the state prediction error covariance is accounted for by the projection equation where P is the covariance of the state prediction error and the matrix A is defined by while ð:Þ T denotes the transpose operation. Also, the parameter Q in (15) is the prediction process noise covariance given by The correction stage: To correct the errors associated with the prediction of the channel gain process evolution using the measurements received from the PU's pilot, we first compute the Kalman gain as where the parameter R represents the measurement noise covariance whose value depends on the peculiarity of the PU-SU operating environment. For the second order approximation to Kalman filter, the matrix H is defined as [41] The optimal estimate of the PU-SU channel gain is then obtained by combining the Kalman gain in (18) with the measurement and prediction Eqs. (6) and (9) yielding the joint a posteriori estimate as From (20), the desired estimate of the magnitude of the channel gain is extracted aŝ It should be noted that a AR 1 ðnÞ and a AR 2 ðnÞ in (20) are the initial rough estimates obtained from the prediction process before correction is done by using the measurement update and I in (21) is the identity matrix. After each cycle of projection in time and measurement update, the process is repeated such that the a posteriori estimates become the initial values for the next cycle. Once the optimal estimate of the PU-SU channel gain has been obtained, the corresponding energy samples will be derived using (3).

Quadratic polynomial regression algorithm for energy prediction
As highlighted in Sect. 2, using the Kalman flter channel estimate, the energy at each SU receiver can be estimated using (3). In order to apply this, we need to have a reliable estimate of the noise power at the receiver, which can be estimated in the absence of any PU transmission. The noise power may include the co-channel interference due to any other transmitters in different cells. In the presence of mobility, the power of noise plus co-channel interference may vary due to various spatial locations. Estimation of this noise power would become non-trivial if the PU is also active. Hence, we propose a method of estimating the noise power during mobility of users and the PU transmission as below. Let / j;x and a j;x = jc j j denote the estimate of the energy and channel gain at various instants x for SU receiver j.
Hence for each SU j, we may relate the energy and channel gain as follows: where c 0;j is the noise plus interference power and c 2;j is the PU transmission power, both are the model parameters we seek to determine, e j;x is an unobserved random error with zero mean conditioned on variableâ j;x . Considering each SU receiver has N number of energychannel estimate samples corresponding to various time instants, the regression model in (23) can be expressed in terms of a response energy vector /, a design matrix A of estimated channel gain, a model parameter vector c, and random errors vector e aŝ   which may be written compactly as Using the ordinary least square estimation method [42], the vector of estimated polynomial regression coefficients is then obtained aŝ Hence, the first element of c j would provide the estimate of the noise plus interference power at the j th SU receiver. Once the estimates of the energy from all participating SUs are obtained from the estimates of the channel gains and the noise power as in Eq. (3), the centroid for H 1 cluster is updated as where b is an adaptation parameter, 0\b\1. In Algorithm 2, the proposed second-order Kalman filter based channel estimation technique applied within the context of spectrum sensing problem is presented.

Numerical results
For the Jake's fading model, the velocity of each SU is set to 6 km/hr. We generated 30,000 symbols received at the central frequency, f c of 2 GHz. Without loss of generality, we assume that the average power P avg: of the fading process is unity, but the proposed method would be applicable to any other value of P avg . The duration of the PU symbol is set to 33.33 ls transmitted at the central frequency, f c . The SUs are assumed to be equipped with omnidirectional antennas while the scatterers are assumed to cause the signals to be received at uniformly distributed angles of arrival. Furthermore, the PU is considered to alternate between the active and inactive states so that the number of clusters, K is set to 2. For the study, each energy sample is computed using the channel estimate which was based on varied pilot length, L. We first considered the case where the PU is cooperating with the SUs and assumed that the pilot is available all the time, only to compare the performance of the order-1 Kalman and order-2 filters. However, a more realistic case where there is no PU cooperation is considered for the rest of the simulations.
In Fig. 2, by 1000 Monte Carlo repetitions, we show the comparison between the estimation capabilities of the first order and the second order Kalman filter in terms of the mean square error (MSE) estimate of the fading over a range of PU's operating SNR from -8 dB to 30 dB and length of pilot symbols for channel estimation, L, equals 10. The PU was considered to be operating at 100%. It can be seen that for the proposed order-2 Kalman tracker, the MSE dropped appreciably from 0.164 to 1.08Â10 À4 as SNR is increased from -8 dB to 30 dB while a drop from 0.382 to 1.8Â10 À4 is observed for the order-1 tracker. Similarly, a shift from the order-1 to order-2 filter indicates about 57.89% reduction in estimation error at SNR of -8 dB, that is, the MSE dropped from 0.382 to 0.164 whereas at the SNR of 30 dB, a decrease of about 40.13 % is seen. These results clearly indicate that the proposed order-2 tracker is a better estimator compared to the order-1 tracker at all cases of SNR considered.
The tracking capability of the second order Kalman filter is presented in Fig. 3. Here, the tracker's performance is evaluated in terms of tracking accuracy over the duration of 6000 symbols at the PU's operating SNRs of -10 dB and 10 dB. The cases considered are both when the PU is operating at 100 percent duty cycle (the PU is active with pilot transmissions all the time) and when operating at 50 percent duty cycle (PU is active only 50% of the time alternating between ON and OFF) and when there is no cooperation with the secondary network. As observed throughout the observation window, the order-2 filter shows a good tracking performance and closely matches up with the true channel gain in both scenarios.
In Fig. 4, we show the comparison between the order-1 and order-2 filter based scheme in terms of their performance for detecting the presence of the PU under the assumption that there is a cooperation between the PU and SUs and the pilot is available all the time. It can be seen here that the order-2 based sensing scheme performs better that the order-1 scheme especially as the SNR is degraded. For example, although both schemes maintained zero average false alarm probability (Pfa ave ) throughout the SNR range considered, an average detection probability (Pd ave ) performance gain of about 4 % is offered by the order-2 scheme as the SNR is reduced from 16 dB to -4 dB. We opine that the improvement offered by the order-2 Kalman filter based scheme over the order-1 counterpart is likely as a result of its capability to capture the dynamics of the varying channel evolution better and the consequent decrease in the channel estimation errors as previously highlighted.
In Figs. 5 and 6, we focus on the performance of the two filters in a more realistic scenario where the PU and the SU networks do not cooperate and the PU operates at 50 % duty cycle. For the study, we set the pilot length, L to 10 and quantified the performance of both schemes in terms of   Pd ave and Pfa ave . In Fig. 5, about 3% detection performance improvement is seen to be offered by the order-2 scheme at the SNR of -4 dB where the Pd ave rises from about 0.71 to 0.74 with the use of order-2 based sensing scheme instead of the order-1 based scheme. Similar improvement in Pd ave can be observed within the SNR range of -4 dB to 6 dB. Similarly, the Pfa ave is reduced from 0.164 to 0.149 (about 9%) at -4 dB in favor of the order-2 based scheme over the order-1 scheme. This improvement in Pfa ave performance can also be observed throughout the SNR range of -4 dB to 6 dB.
We show the performance of the proposed order-2 filter based channel tracking spectrum sensing scheme under mobile SUs scenario and compare with the performance of the scheme where channel tracking is not used, that is, nontracking mode (NTM) in Fig. 7. The PU's operation is maintained at 50% duty cycle and L is kept at 10. As seen, the channel tracking based scheme exhibits superior performance in terms of Pd ave compared to the NTM system throughout the entire SNR range considered. It is especially noteworthy that as the SNR is improved from -10 dB to 20 dB, while the proposed channel tracking based scheme provides improvement in both Pd ave and Pfa ave , there is no noticeable performance gain in the NTM scheme. Furthermore, due to fading, the NTM scheme is characterized by significant missed detection. This indicates that the NTM scheme fails to cater to the challenges of PU detection in spectrum sensing for cognitive radio system when the SUs are mobile within the network and the PU-SU channel experiences aging/fading. It should be noted that for the NTM scheme, the centroids remain the same throughout the testing period, however, the true channel has been varied according to the Jakes fading model. Hence, the Pd ave and Pfa ave performance would be influenced by the initial channel values of the fading profile.
In Fig. 8, we study the effect of the variation in the duty cycle of the PU on the performance of the proposed channel tracking sensing scheme and the NTM scheme over the SNR range of -10dB to 20dB. It can be observed that as the duty cycle is increased from 25% to 75%, the performance of the proposed order-2 scheme improves as measured by Pd ave and Pfa ave . For example, at the SNR of -10dB, the proposed scheme offers an   14. An overall improvement in the performance of the channel tracking based scheme can also be observed as the SNR is improved from -10dB to 20dB. On the other hand, although the NTM scheme maintains zero Pfa ave throughout the range of SNR considered, its capability to detect the presence of the PU is reduced as the duty cycle of the PU is increased. The reduction in the NTM's capability for PU's detection is noticed across all SNR where Pd ave is maintained at approximately 0.26 and 0.75 for 75% to 25% duty cycle respectively. Fig. 9 shows the effect of varying the pilot length used for channel estimation on the performance of the proposed order-2 filter tracking based sensing scheme. It can be observed that as the pilot length is increased from 10 symbols to 30 symbols at 50% duty cycle operation of the PU, the system's performance is improved. For example, at the SNR of -10 dB, Pd ave is raised from 0.62 to 0.72 (about 16% gain) while the Pfa ave is reduced from 0.29 to 0.17 (about 41% reduction). It is noteworthy that at the SNR of 0 dB, the proposed scheme achieves zero Pfa ave and 0.96 Pd ave when the number of symbols in the pilot length is 30 indicating the capability of the proposed scheme to meet the performance requirement of CRs in terms of detection accuracy.
The receiver operating characteristics performance of the proposed second order Kalman filter channel gain estimation based sensing scheme is shown in Fig. 10. We considered 10 symbols and 20 symbols for the pilot length while the PU operating SNR of -5 dB, 0 dB and 5 dB were used for the investigation. It can be seen that the system's performance is enhanced both when the SNR improves and when the pilot length is increased. For example, at 5 dB, given that the operational duty cycle of the PU is kept at 50%, a Pd ave of 0.94 is achieved at the Pfa ave of 0.1. Furthermore, given the same PU operational duty cycle and Pfa ave of 0.1, an increase in Pd ave from 0.53 to 0.63, 0.78 to 0.9, and 0.94 to 0.98 are obtained at the SNR of -5 dB, 0 dB and 5 dB respectively as symbol size of the pilot used for the channel estimation is raised from 10 symbols to 20 symbols. These results further lend credence to the robustness of the proposed second order Kalman filter channel estimation method for spectrum sensing in CR networks of mobile SUs.
Finally, to conclude our investigations, we consider the implementation complexity of the proposed Kalman filter channel estimation based spectrum sensing scheme. The evaluation was done on an Intel core i5 À 5200U dual processors with CPU clocking speed of 2.20GHz and using MATLAB software version R2016b. Our comparison is based on the computation of average learning and prediction durations for implementing the first and second order channel gain trackers. For the same parameters as used in the previous simulations, the computation time averaged over 10,000 Monte Carlo runs for the first and he second order trackers are 18.97 ls and 22.64 ls respectively. As expected, the second order channel gain tracker has more computational complexity as compared to the first order channel gain tracker, however, this is compensated by the improvement in sensing performance as seen in the previous simulations.

Conclusion
In this paper, we studied the problem of spectrum sensing in cognitive radio networks of mobile secondary users. In particular, we considered the performance degradation that occurs when mobile secondary users are cooperatively sensing primary user's activities under flat fading channel conditions in the presence of scatterers. We presented a second order Kalman filter technique for real time estimation of the slowly fading channel gain between the primary user and secondary users. The estimated channel gain was then used to update the centroids of the K-means clustering based spectrum sensing scheme ''on the fly''. The performance of the proposed channel estimation technique was evaluated using mean square error estimation and tracking accuracy metrics while the performance of the ensuing spectrum sensing algorithm was quantified in terms of probability of detection, probability of false alarm and receiver operating characteristics. Simulation results show that the proposed techniques offer significant advantage for spectrum sensing in cognitive radio networks of mobile secondary users in comparison with previously proposed alternatives.
Acknowledgements Partial results of this paper were presented at the 10th Int. Conf. on Cognitive Radio Oriented Wireless Networks (CROWNCOM), Doha, Qatar, Apr. 2015 [26].

Compliance with ethical standards
Conflict of interest The authors declare that they have no conflict of interest.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons. org/licenses/by/4.0/.