New Performance Optimization Approach for Cognitive Radio Energy Detection ()
1. Introduction
Last few years, we’ve observed a proliferation of radio standards and connected objects, which lead to a saturation of radio communications spectrum allocation tables. This has resulted in the development of software defined radio and later cognitive radio which is a software radio able to sense its environment and adapt its radio parameters accordingly. The first and key step of cognitive cycle is spectrum sensing. Many spectrum sensing techniques have been developed each with its accuracy and complexity. However, energy detection technique with its low complexity remains of great interest despite its low accuracy [1] especially for low signal-to-noise ratio. We propose in this paper a new approach to improve energy detection technique performance while keeping its complexity, this for low signal-to-noise ratio. However, a cognitive radio is a software defined radio able to sense its environment and adapt its radio parameters accordingly. Cognitive radio especially aims to exploit under-utilized spectral resources, by allowing secondary users to temporary use spectrum resources not occupied by primary users [2]. Figure 1 represents the simplified cognitive cycle [3].
The first step of cognitive cycle, spectrum sensing is a key phase of dynamic spectrum access. It allows a secondary user to determine whether a part of spectrum is free or not [4]. The following section is focused on this phase. However, spectrum sensing aims to determine presence of absence of a primary user [5] and thus detect unused spectrum. This spectrum sensing problem can be modeled as a binary hypothesis problem as presented in preceding works such as [3] on energy detection technique for spectrum sensing in cognitive radio [6], on spectrum sensing techniques based on network sensors [7], on enhanced cognitive radio energy detection technique based on estimation of noise uncertainty. Many techniques have been developed for spectrum sensing as for instance: Energy detection, Cyclostationary based detection, Matched Filtering detection, Covariance based detection. However, energy detection remains one of mostly used techniques owing to its low complexity and that it doesn’t require any prior information of received signal [8]. The following section presents energy detection technique and its limits.
In Section 2, we present the method. Section 3 is devoted to the performance optimization method proposed for energy detection. In Section 4, the results and discussion are presented. Conclusion appears in Section 5.
2. Method for Optimizing Energy Detection and Tools
2.1. Principle
Energy detection is done by defining test function
as energy of received sample, and by determining a threshold
such as
correspond to
and
correspond to
[9] [10].
Hence, for N + 1 received samples
(1)
The performance of such detector is evaluated by following indicators [6].
- Probability of detection Pd which represents the probability to decide that a primary user is present when he is really present:
(2)
- Probability of false alarm Pfa which represents the probability to decide that a primary user is present whereas the spectrum is free.
Figure 1. Simplified cognitive cycle [3].
(3)
Please note: a subsidiary indicator, probability of miss Pm can also be used. It represents the probability to decide that the spectrum is free whereas a primary user is present.
(4)
In order to compare detectors, Pd and Pfa can be represented in a single graph called ROC curve (Receiver Operating Characteristic curve), as illustrated in Figure 2.
2.2. Energy Detection Performance and Limits
To determine energy detection performance, we consider noise w(k) and useful signal x(k) as respectively Gaussian white noise with variance
and
[6] [12] [13].
Thus
and
.
Now, let’s consider
, the number of received samples
. And
, the signal-to-noise ratio.
2.2.1. Under H0 Hypothesis
follows a Chi-square distribution with Ns degree of freedom.
It can thus be shown by applying central limit theorem that
can be approximated by a normal distribution with mean Ns and variance 2Ns.
Thus
under H0 hypothesis.
2.2.2. Under H1 Hypothesis
follows a non-central chi-square distribution with Ns degree of freedom and a non-centrality parameter Ns × SNR.
By approximating
by normal distribution, it can be shown that under H1 hypothesis,
From relations (3) an (4), with can therefore deduce the probability of detection Pd and the probability of false alarm Pfa
(5)
(6)
By eliminating
in relations (5) and (6), we obtain the following relation for the ROC curve:
(7)
And by approximating (5) and (6) with normal distribution, we have:
(8)
From relations (10), it appears that Pd increases with signal-to-noise ratio SNR, for a fiven Pfa. However, Pd quickly decreases for low values of SNR. That is a weakness of energy detection despite its low complexity [12] [14]. This technique is less accurate for environment with low signal-to-noise ratio [15]. In the following section, we present our approach to optimize energy detection performance for low SNR by statistical discrimination of received samples.
2.3. Performance Optimization with Statistical Discrimination of Samples
To simplify analysis and present our approach, we will consider for the following a signal-to-noise ratio SNR = 0.5 and sample number Ns = 128.
Now let’s consider noise sample
and useful signal
. The received signal is thus
.
To analyze w and x + w characteristics, we’ve used python pandas library in two steps: first, sample data generation and after true statistical analysis. The choice of python was driven by the fact that, first of all, it’s open source, furthermore it can be easily deploy in a software defined radio environment such as GNU Radio.
The following algorithm has been used for sample data generation.
# Parameters definition
Ns ← Define Number of sample
# Please note: If samples are defined from 0 to N, Ns = N + 1
M ← Define the number of y realization to generate
# (y = x + w)
wvar ← Define the noise variance
SNR ← Define signal-to-noise ratio
# Noise generation
w ← Define w as a Ns x M matrix
For k from 0 to N # N = Ns ? 1
w [k,:] ← Generate M values following normal distribution Ɲ (0,wvar)
End For
# Signal generation
xvar ← SNR * wvar # signal variance computation
x ← Define x as a Ns x M matrix
For k from 0 to N # N = Ns ? 1
x [k,:] ← Generate M values following normal distributionƝ (0,xvar)
End For
# Opening CSV file (Comma Separated Values file) for data recording
f_noise ← open file ‘data_noise.csv’ in write mode
f_signal_noise ← open file ‘data_signal_noise.csv’ in write mode
# Header writing in CSV files
Write_csv (f_noise, ['mean', 'std', 'std1', 'std2'])
Write_csv (f_signal_noise, ['mean', 'std', 'std1', 'std2'])
# Pandas DataFrame generation and data saving
For j from 0 to M-1
df_noise ← pandas.DataFrame(w[ :,j])
df_signal_noise ← pandas.DataFrame(x[ :,j] + w[ :,j])
Write_csv (f_noise, df_noise, df_noise.mean(),
df_noise.std(), df_noise[0:(Ns/2)-1].std(), df_noise[Ns/2 : Ns-1].std())
Write_csv (f_signal_noise, df_signal_noise,
df_signal_noise.mean(), df_signal_noise.std(),
df_signal_noise[0:(Ns/2)-1].std,
df_signal_noise[Ns/2 : Ns-1].std())
End For
# Closing CSV files
Close file f_noise
Close file f_signal_noise
The previous algorithm allows us to generate and store realizations of noise and received signals (useful signal added to noise) including their mean and variance. Below an extract of samples generated data (Figure 3).
Once we’ve generated sample data, we can start statistical analysis with python pandas library as detailed below.
# Loading data from CSV files
import pandas as pd
data_noise ← pd.read_csv(‘data_noise.csv’)
data_signal_noise ← pd.read_csv(‘data_signal_noise.csv’)
# Noise characteristics display
Print ‘Noise’
Print data_noise.describe(percentiles = [0.1, 0.2, 0.8, 0.9])
# percentiles = [0.1, 0.2, 0.8, 0.9] allow us to determine the distribution at 10%, 20%, 80% and 90%
# Signal + Noise characteristics display
Print ‘Signal + Noise’
Print data_signal_noise.describe(percentiles = [0.1, 0.2, 0.8, 0.9])
# percentiles = [0.1, 0.2, 0.8, 0.9] allow us to determine the distribution at 10%, 20%, 80% and 90%
Figure 4 shows the output of this algorithm. We can observe that 80% of samples of noise have a standard deviation (column std.) below 1.05, whereas less than 20% of samples of signal + noise have a standard deviation below 1.06. Hence (always assuming SNR = 0.5), a received sample with standard deviation greater than 1.055 (mean of 1.05 and 1.06) has at least a probability of 0.8 to be a H1 sample and a maximum probability of 0.2 to be a H0 sample.
Figure 4. Descriptive statistic of noise and signal + noise samples.
3. Performance Optimization Method Proposed for Energy Detection
The diagram in Figure 5 summarizes the performance optimization method proposed for energy detection.
With the previous observation, we thus propose the following algorithm to improve the performance of our energy detection. The idea is to amplify (by applying a factor greater than 1) the computed energy when the received signal has more than 80% of chance to be H1, and to reduce the computed energy (by applying a factor less than 1) when the received signal has more than 80% of chance to be H0.
The proposed Test function (Energy Detection Improved) TEDI(y) is defined by the following rule.
If standard_deviation (y) > 1.055
ampli = 1.2
Else If standard_deviation (y) < 1.055
ampli = 0.8
Else
ampli = 1 # Ambiguous limit case
where
and
is used as a discrimination offset.
4. Results and Discussion
4.1. Algorithm of Simulation
In this work, Python programming language has been used with its pandas library because it is suitable for scientific and engineering development, for numerical calculations, data analysis and data visualization. However, the proposed test function TEDI(y) can’t be easily approximated with central limit theorem like standard energy detection function TED(y) because of unequal weights applied on samples. Therefore we’ve used the following algorithm, which is able to draw the ROC curve for any test function T(y). It’s based on empirical distribution function.
Figure 5. Performance optimization method proposed for energy detection.
# Parameters definition
Ns ← Define the number of samples (to consider for energy computation)
# Remark: If samples are defined from 0 to N, Ns = N + 1
M ← Define the number of y realization to generate
wvar ← Define noise variance
SNR ← Define signal-to-noise ratio
# Noise generation
w ← Define b as a Ns x M matrix
For k from 0 to N # N = Ns ? 1
w[k,:] ← Generate M values following normal distribution Ɲ (0,wvar)
End For
# Signal generationScott, 2014
xvar ← SNR * wvar # signal variance computation
x ←Define x as a Ns x M matrix
For k from 0 to N # N = Ns ? 1
x [k,:] ← Generate M values following normal distribution Ɲ (0,xvar)
End For
# Generation of M samples y[i] of y
y ← Define y as M dimension vector
# Computation under H0 hypothesis
For I from 0 to M ? 1
y [i] ← T(w[ :, i])
# y[i] based on generated noise samples
# Please note: w[ :, i] samples are taken in column (independent variables)
End For
# Distribution function under H0 hypothesis
py0 ← Define py0, probability vector of M dimension
For i from 1 to M
py0 [i] ← i/M
End For
sy0 ← Sort y value and set result to sy0 variable
# sy0 and py0 thus represent empirical distribution unction under H0 hypothesis
dfy0 ← interpolation function (sy0, py0) with minimal value 0 and maximal value 1
# Computation under H1 hypothesis
For i from 0 to M ? 1
y [i] ← T(x[ :, i] + w[ :, i])
# y[i] based on generated signal and noise samples
# Please note: x[ :, i] and w[ :, i] samples are taken in column (independent variables)
End For
# Distribution function under H1 hypothesis
py1 ← Define py1, probability vector of M dimension
For i from 1 to M
py1 [i] ← i/M
End For
sy1 ← Sort y value and set result to sy1 variable
# sy1 and py1 thus represent empirical distribution function under H1 hypothesis
dfy1 ← interpolation function (sy1, py1) with minimal value 0 and maximal value 1
# Pfa and Pd determination
lambda ←array from 0 to 10000*Ns with step of 100*Ns
Pfa = 1 ? dfy0(lambda)
Pd = 1 ? dfy1(lambda)
# ROC Curve drawing
Plot(Pfa, Pd, label = ’ROC Curve’)
Figure 6. ROC standard and improved energy detection.
4.2. Comparison of ROC Energy Detection Standard and ROC Energy Detection Improved
Figure 6 presents the result after the simulation of the improved algorithm.
The simulation of the ROC curve of this energy detection method with statistical optimization shows that we can obtain for some values of probability of false alarm Pfa, a probability of detection Pd greater than standard energy detection one. Figure 5 illustrates an example with δ = 0.2. We can observe from simulation that improved energy detection ROC curve is not all the time above the standard one. But, asshown by the green arrow, the result is interesting when wecan have the improved ROC curve, upper for low values of Pfa, since in real world; the objective is to minimize probability of false alarm Pfa while increasing probability of detection Pd.
5. Conclusion
Energy detection remains one of the mostly used spectrum sensing technique despite its low performance, especially for low signal-to-noise ratio. We propose in this paper a new approach to improve energy detection performance for low signal-to-noise ratio, and we’ve simulated the proposed algorithm for a signal-to-noise ratio of 0.5. We’ve seen on the ROC curve that it’s possible to have a probability of detection Pd greater than the one of standard energy detection, for some low values of probability of false alarm Pfa. Future works may be interested to generalize the method for any value of signal-to-noise ratio.