Access to this full-text is provided by Hindawi.
Content available from International Journal of Antennas and Propagation
This content is subject to copyright. Terms and conditions apply.
Research Article
Robust Spectrum Sensing Demonstration Using a Low-Cost
Front-End Receiver
Daniele Borio, Emanuele Angiuli, Raimondo Giuliani, and Gianmarco Baldini
European Commission, Joint Research Centre (JRC) Institute for the Protection and Security of the Citizen (IPSC)
Digital Citizen Security Unit, Via Enrico Fermi 2749, 21027 Ispra, Italy
Correspondence should be addressed to Gianmarco Baldini; gianmarco.baldini@jrc.ec.europa.eu
Received April ; Revised July ; Accepted July
Academic Editor: Feifei Gao
Copyright © Daniele Borio et al. is is an open access article distributed under the Creative Commons Attribution License,
which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
Spectrum Sensing (SS) is an important function in Cognitive Radio (CR) to detect primary users. e design of SS algorithms is one
of the most challenging tasks in CR and requires innovative hardware and soware solutions to enhance detection probability and
minimize low false alarm probability. Although several SS algorithms have been developed in the specialized literature, limited work
has been done to practically demonstrate the feasibility of this function on platforms with signicant computational and hardware
constraints. In this paper, SS is demonstrated using a low cost TV tuner as agile front-end for sensing a large portion of the Ultra-
High Frequency (UHF) spectrum. e problems encountered and the limitations imposed by the front-end are analysed along
with the solutions adopted. Finally, the spectrum sensor developed is implemented on an Android device and SS implementation
is demonstrated using a smartphone.
1. Introduction
Spectrum Sensing (SS) is one of the most challenging tasks in
Cognitive Radio (CR) []. In particular, SS consists of scan-
ning a large portion of the Radio Frequency (RF) spectrum
anddetectingthepresenceofpossiblyweaksignalsinthefre-
quency band of interest. A cognitive device has to determine
with a high level of condence if a specic band is unoccupied
before using it for its own operations. High detection proba-
bility is required to ensure that primary users are adequately
protected, while minimization of false alarms improves the
eciency of secondary users to transmit in RF spectrum
bands not occupied by primary users. For this reason, several
techniques have been developed to improve the sensitivity of
SS. ese techniques include the energy detector, the cyclo-
stationarity detector and the matched lter detector [–].
e energy detector is the most simple technique available
in the literature because of its low computational and imple-
mentation complexity. In addition, the energy detector does
not require a priori knowledge of the primary user Signal-of-
Interest (SOI) and it is therefore more versatile and it can be
adopted for the dierent types of signals. ese techniques
are designed assuming an ideal front-end for the collection
of the samples used for signal detection. us, the presence of
spurs and gain variations are usually neglected. e oscillator
used for signal down-conversion can however introduce
harmonics and power can “leak” from adjacent bands if the
front-end lter has insucient side-band rejection. Front-
end nonidealities can strongly impact the detection process
and need to be accounted for. Although these nonidealities
are considered in the recent literature [–], only ad hoc
solutions, including the increase of the decision threshold
[,] and the usage of frequency domain excision techniques
[], were suggested.
In this paper, practical SS is demonstrated using a low-
cost TV tuner, the Realtek RTLU [] device, which is
adopted as agile front-end. e nonlinearities caused by the
low-cost device are accounted forusing a robust approach for
spurious removal. e technique proposed requires a reduced
computationloadandcanthusbeimplementedondevices
with limited computational resources.
e contribution of this paper is twofold. At rst the
propagation impairments caused by a low-cost front-end are
experimentally characterized. It is shown that SS has to take
Hindawi Publishing Corporation
International Journal of Antennas and Propagation
Volume 2015, Article ID 464982, 11 pages
http://dx.doi.org/10.1155/2015/464982
International Journal of Antennas and Propagation
into account the spurs and interfering signals caused by the
front-end, that is, the sensor used for sensing. Traditional
techniques such as the energy detector can be negatively
aected by the presence of such interfering terms and robust
detection techniques []shouldbeemployed.Inthisrespect,
the classical energy detector is modied using robust opera-
tors such as the median. e development of robust energy
detection techniques is the second major contribution of
thepaper.eadvantagesofthetechniquedevelopedare
analysed in terms of probability of false alarm, that is,
the probability of incorrectly declaring a frequency band
occupied.euseofthemedianasrobustoperatorallows
the removal of spurious components improving the overall
performance of the system.
e technique proposed is computationally ecient and
can be implemented in platforms with limited computational
resources. In this respect, the developed SS technique has
been implemented on an Android device and SS is demon-
strated using a smartphone.
e remainder of the paper is organized as follows: the
problemofSSandclassicalSStechniquesarediscussedin
Section whereas the signal model adopted for the detector
design is provided in Section . e robust energy detector
proposed to deal with interference is described in Section
and characterized from a statistical point of view in Section .
e system architecture and its implementation are detailed
in Section . Experimental results are nally provided in
Section .Section concludes the paper.
2. Spectrum Sensing Techniques
SSistheprocessofdetectingthesignalpresenceinaspe-
cic frequency band. us, it is a binary hypothesis testing
problemwhereitisnecessarytodecidebetween
0:[]=[],=0,...,−1,
1:[]=[]+[], =0,...,−1,()
where 0and 1are the null and alternative hypothesis,
respectively. e null hypothesis assumes that the band of
interest (portion of spectrum under analysis) is not occu-
pied by a signal component and only the noise term,
[], is present. On the contrary, the alternative hypothesis,
1, assumes that also a useful signal component, [],is
present. In (), the dierent components are digital sequences
obtained by digitizing an analog signal using a sampling
frequency, 𝑠.
Note that () denes the simplest form of the problem
addressed by SS. In particular, under the assumption that []
is a complex circularly symmetric Gaussian process, model
() denes a simple Additive White Gaussian Noise (AWGN)
channel. Eects such as interference and channel distortions
are neglected. More complex models accounting for fading
and interference are to be considered in order to handle real
channel eects [,]. In this paper, a signal model accounting
for frequency-dependent interference terms is considered.
Moreover, at spectral characteristics are assumed on the
frequency band considered for sensing. More details on the
model adopted in this paper are provided in Section .
Detector
D
Decision
variable
Detector
Detector
Combing strategy
reshold
comparison
y[n]
D1
DK
>Th
···
F : Principles of signal detection: the decision variable, ,
is computed from the input sample, [].Severaldetectorscan
be adopted in parallel to compute a set of decision variables. A
combining strategy is then adopted to evaluate the nal decision
statistic.
In order to decide between 0and 1, dierent detectors
have been suggested in the literature [,]. A detector is
a function of the input data which is used to compute a
decision variable which, in turn, is compared with a decision
threshold[]. e basic principle of signal detection is shown
in Figure .einputsamples,[],arecombinedtoformthe
decision statistic, . e alternative hypothesis is selected if
passes the decision threshold, ℎ. Note that several detectors
can be adopted in parallel as shown in Figure .Inthiscase,
a combining strategy is required to form a new composite
decision variable which is then compared against the decision
threshold. e use of several detectors can improve the
reliability of the nal decision.
A review of the dierent detectors adopted in the litera-
tureforSScanbefoundin[,]. At the basis of the design of
a signal detector, there is usually a model which incorporates
theinformationavailableonthesignalandnoisecomponents
in ().Ingeneral,themoreinformationonthesignalstructure
is exploited, the more the detector will be eective. is
principle is valid only in the absence of model mismatches:
if errors are present in the signal and noise descriptions then
the detector may suer signicant performance degradations.
us, the design of a signal detector is usually a compro-
mise between detection performance and robustness against
model mismatches.
A signal detector widely adopted in the literature is the
energy detector:
𝑒=1
𝑁−1
𝑛=0[]2,()
where 𝑒represents an estimate of the energy of the input
samples, []. e assumptions behind () are that both
signal and noise samples can be modelled as zero mean cir-
cularly symmetric Gaussian random processes.
When the energy detector is used, a signal in a specic
frequency band is declared present if its energy exceeds a
decision threshold, ℎ. is threshold depends on the noise
variance, 2,whichshouldbeknown.When2is not known,
International Journal of Antennas and Propagation
it needs to be estimated. For this reason, noise oor estimators
are required. A simple approach is to measure 2by consid-
ering signals in frequency bands that are known to be unoc-
cupied and contain noise only. Note that the problem of noise
oor estimation is a common problem in communication and
navigation. Examples of noise oor estimators adopted for
the detection of Global Navigation Satellite System (GNSS)
signals can be found in []. e basic principle of noise
oor estimation is to remove rst the signal component and
measure the noise power alone. Errors in the knowledge of 2
can signicantly reduce detection performance.
e energy detector has been used as starting point for the
design of several SS techniques which account, for example,
for communication channels with non-at spectral charac-
teristics [] and for other transmission impairments [].
More advanced detectors employed for SS exploit the
knowledge of specic signal properties and are oen referred
to as feature detectors []. For example, communication
signals are oen characterized by nonstationary correlation
functions (second order statistics) and detection can be
performed in the signal correlation domain. ese detectors
include the cyclostationary detector and the peak autocorrela-
tion magnitude detector. e former tries to identify the pres-
ence of periodic patterns in the time-varying autocorrelation
function of the input sample, []; the latter veries if the
maximum of the autocorrelation function (computed on a
sliding window) is higher than the decision threshold. More
recently, Compressive Sensing (CS) approaches have also
been adopted for SS []. ese techniques allow a signicant
reduction in the number of samples required for detecting the
signal presence.
Several other detectors have been suggested and addi-
tional details can be found in [,] and in the references
therein.
3. Signal Model
Low-CostSowareDenedRadio(SDR)front-ends,suchas
the Realtek RTLU []device,areabletocollectrelatively
narrowband signals with a specied centre frequency, 𝑐.In
particular, the centre frequency of the band of interest can
be easily specied using the Application Program Interface
(API) of the device [].
e signals are ltered, down-converted, sampled, and
digitized. e output of the front-end is thus a digital
sequence which can be eectively modelled as
𝑠,𝑐=𝑠𝑠,𝑐+𝑐𝑠,𝑐
+𝑠,𝑐, ()
where 𝑠=1/𝑠is the sampling interval used to digitize
the input analog signal. In (),(𝑠,𝑐)is the useful signal
normalized in order to have real and imaginary parts with
unit power. Depending on the SOI, dierent models can be
adopted to describe (𝑠,𝑐). Moreover, additional factors
canbeaddedinordertotakeintoaccountpropagationeects
such as the channel impulse response. In this paper, nar-
rowband SS is performed; that is, relatively small frequency
bands are considered during sensing. In this way, it is possible
to assume a at frequency channel on the frequency band
selected. is model is justied by the experimental results
reported in Section .
When TV White Spaces (WSs) are considered, (𝑠,𝑐)
is modelled as a zero mean complex circularly symmetric
Gaussian random process with real and imaginary parts with
unit variance. is type of model is justied for Orthogonal
Frequency Division Multiplexing (OFDM) modulations []
where the central limit theorem can be applied. e symbol,
𝑠, determines the total power, =22
𝑠,oftheusefulsignal.
When 𝑠=0, the useful signal components are absent and the
channel is available for secondary users. Detection problem
() canberestatedintermsof𝑠: the goal of SS is to determine
if 𝑠is equal to zero or not.
Finally, it is noted that low-cost front-ends are char-
acterized by relatively low sampling frequencies, 𝑠.us,
(𝑠,𝑐)represents only a narrow portion of the SOI.
Components from several frequencies should be considered
to detect the presence of wideband signals.
Signal (𝑠,𝑐)is a complex interfering term with ampli-
tude, (𝑐), dependent on the centre frequency, 𝑐.Itwill
be shown that, in the absence of interference from adjacent
bands, (𝑠,𝑐)can be eectively described as a Continuous
Wave (CW). More complex models should be considered
to account for the impact of receiver nonlinearities in the
presence of strong signals on adjacent bands []. When
=0, no interference is present. (𝑠,𝑐)is the receiver
noise modelled as a zero mean complex circularly symmetric
Gaussian random process with real and imaginary parts with
variance, 2(𝑐).
e interference term is due to Local Oscillator (LO)
leakage, In-Phase/Quadrature (I/Q) imbalances, and Direct
Current (DC) oset. LO leakage occurs when the signal
generated by the local oscillator enters the reception path of
the front-end and thus a CW interference is perceived by
the receiver. I/Q imbalances are due to a nonideal behaviour
of the two arms of the front-end demodulator whereas the
DC oset is due to power supply noise leaking on the
demodulator output.
Standard SS techniques neglect the presence of the inter-
fering term, (𝑠,𝑐), and thus can suer signicant perfor-
mance degradation. In the next section, an approach robust
to frequency outliers is derived. An empirical justication to
model () is provided in Section .
4. Robust Energy Detection
In order to be able to perform SS in the presence of interfer-
ence, a robust algorithm is required. In this paper, robustness
is intended in the distributional sense; that is, it is the ability
of a system to deal with model mismatches []. Consider, for
example, a simple energy detector, in the absence of signal,
theinputsamplesareassumedtobemadeofnoiseonly.
e noise term is assumed to follow a complex Gaussian
distribution and the decision threshold is set according to this
hypothesis. When oscillator spurs are present, this hypothesis
is violated and the model is no longer valid. A robust SS
technique has to be able to deal with this type of model
mismatch. In addition to this, the algorithms have to be
International Journal of Antennas and Propagation
Energy
evaluation
Analysis
window
Nonlinear
combiner
D
Final decision
variable
reshold
testing
Select Krealizations
of E(fc)on adjacent
frequency bands
E(fc)
y(nT
s,f
c)
···
F : Two-stage detector architecture.
computationally ecient in order to be able to operate in real-
time, for example, on an Android platform.
As mentioned in Section , the energy of a signal is
dened as
𝑐=1
𝑁−1
𝑛=0𝑠,𝑐2.()
is is the energy measured around the centre frequency, 𝑐,
considering a narrow portion of the spectrum. is frequency
band is dictated by the sampling capabilities of the front-end.
If the SOI is wideband, then its total energy is given by
𝑒=1
𝐾−1
𝑘=0min +, ()
where min is the minimum centre frequency considered,
is the frequency step used to explore the dierent frequency
values, and is the number of frequency bands analysed. e
maximum centre frequency considered is given by
max =
min +(−1). ()
Equations () and () dene a two-stage procedure for
computing the energy of the SOI. Energy () is not robust
and if (𝑠,𝑐)is contaminated by interference, then an
anomalous total energy will be estimated.
Inorder,toobtainrobustenergyestimation,() is
generalized and the two-stage detection scheme detailed in
Figure is suggested. realizations of (𝑐)are selected
on adjacent frequency bands using the analysis window in
Figure and are used to compute a robust decision variable,
.is obtained as the output of a nonlinear combining
function:
=
𝐾min ,...,𝑐,...,max. ()
e rst stage of the detection scheme signicantly reduces
the computational complexity whereas the nonlinear com-
bining strategy adopted for the second stage improves the
robustness of the system.
In this paper, we consider the class of -estimators []
for the design of 𝐾in ().-estimatorshavebeenproposed
as robust solutions for estimating the location (mean) of a
sequence of random variables []. In this respect, can be
interpreted as an estimate of the energy measured on the
frequency band tot =, ()
where is the frequency band of the samples collected for
a xed centre frequency, 𝑐.is dened by the capabilities
of the front-end used for SS. e standard energy detector in
() can, for example, be obtained by choosing
𝐾[⋅]=mean (⋅).()
Equation () will be used as baseline for assessing the
robustness of the algorithm selected. In this paper, the sample
median []isusedasarobustlocationestimator:
𝐾[⋅]
=median min ,min +,...,max . ()
When the number of samples used to compute partial energy
() is large, then it is possible to invoke the central limit
theorem and approximate (𝑐)as a real Gaussian random
variable:
𝑐∼N22+2
𝑠
+2,4
2+2
𝑠2+2+2
𝑠, ()
where the dependence on 𝑐has been dropped for ease of
notation. e mean and variance of (𝑐)are computed in
the Appendix.
e presence of an interfering term in () increases the
mean and variance of the energy measured in a specic
channel. From the results presented in Section ,itisshown
that interference is present only at specic frequencies and
thus it is reasonable to assume that is nonzero only for a
limitednumberofbands.Forthisreason,itispossibleto
model as a scaled Bernoulli random variable:
=0with probability
0withprobability1−. ()
Equations () and () dene a contaminated model where
is the contamination percentage. e sample median is able
to eectively cope with contamination models and thus it has
been selected for the robust estimation of the signal energy.
5. Statistical Characterization
e performance of a detector is usually characterized
in terms of probability of false alarm and probability of
detection []. e probability of false alarm quanties the
occurrence of type errors, that is, the incorrect detection
ofsignalsinanunoccupiedfrequencyband.eprobability
of detection is the probability of correctly detecting the
signal presence. e probability of false alarm is particularly
important since it is usually adopted for setting the decision
threshold, ℎ. In this section, the impact of interference on
the false alarm probability is analysed. In particular, the false
alarm probability is dened as
fa ℎ=>ℎ|0,()
where 0is the null hypothesis dened in ().edecision
thresholdisobtainedbyxingatargetprobabilityoffalse
alarm and inverting ().
International Journal of Antennas and Propagation
When standard energy detector () is used, and in the
absence of interference, the false alarm probability associated
tothedecisionvariable,𝑒,isgivenby
fa ℎ=1− ℎ−22
44/(⋅), ()
where (⋅)istheCumulativeDensityFunction(CDF)ofa
standard Normal Gaussian random variable. Equation ()
has been obtained by considering the fact that, in the absence
of interference and under 0, the mean and variance of (𝑐)
become 22and (4/)4, respectively. Mean operator ()
leaves the mean of 𝑒unaltered and reduces the variance of
(𝑐)by a factor .
e threshold, ℎ,isobtainedbyxingfa and inverting
(). In the presence of outliers, that is, in the presence
of energy spikes due to interference, the actual probability
of false alarm signicantly increases with respect to the
desired value. is performance degradation is analysed here
as a function of the contamination percentage, ,andthe
Interference-to-Noise power ratio (/) is dened as
=2
22.()
Although the sample median does not, in general, follow
a Gaussian distribution, it is possible to show []thata
Gaussian approximation can be eectively adopted for large
values of .Inthiscase,thevarianceofis increased by a
factor /2[] with respect to the mean operator. is is the
loss of eciency to be paid to improve the robustness of the
system. us, the Gaussian approximation of the probability
offalsealarmforthemediancaseisgivenby
fa ℎ=1− ℎ−22
24/(⋅). ()
is probability of false alarm is used in the following
paragraphtosetthedecisionthresholdinthemediancase.
e false alarm probability degradation, considering
mean and median operators, is shown in Figure where the
estimated fa is plotted as a function of the desired proba-
bilities, () and (),foraxed/ = 0 dB. For the simu-
lations, the parameters reported in Table have been used.
ese parameters correspond to the values that could be
encountered for a typical Digital Video Broadcast-Terrestrial
(DVB-T)signalwithatotalfrequencyoccupationequalto
MHz. In the absence of degradation, the curves shown in
Figure should coincide with the diagonal of the square with
corners (0,0)and (1,1): the higher the distance from such
diagonal is, the more the detector is aected by the interfering
term. As expected, all the curves in Figure are above the
diagonal and thus all the detectors suer some degradations.
e detector based on the median is however signicantly less
aected by the presence of outliers and only relatively small
displacements from the diagonal are observed. Degradations
become more and more severe as the contamination factor,
,isincreased.For=0.3, the mean detector provides an
actual false alarm probability practically saturated to : this
implies that the detector will always declare the signal present
T : Parameters adopted for the simulation performed in
Figures and .
Parameter Value
MHz
SOI total b andwidth MHz
Mean-p = 0.1
Mean-p = 0.2
Mean-p = 0.3
Median-p = 0.1
Median-p = 0.2
Median-p = 0.3
J/N = 0 dB
Pfa Est
Pfa
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.80.90.9
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
11
F : Degradation in terms of false alarm probability as a
function of the contamination probability, ,foraxed/=0dB.
= 1MHz,=8. Probabilities of false alarm have been plotted
in logarithmic scale.
even if the frequency channel is unoccupied. is makes the
standard energy detector unusable.
e degradation is analysed for a xed contamination
probability (=0.1) and for dierent /values, that is −,
−, and dB in Figure .eselow/values demonstrate
the lack of robustness of standard techniques which suer a
signicant increase in terms of false alarm probability even
in the presence of weak interference. e performance of
the median operator does not depend on the / of the
interfering signal and thus only the worst case is considered
in Figure .
Curves relative to the standard approach tend to the sat-
uration curve fa,sat which can be expressed as
fa,sat ℎ=1−𝐾fa +1−1−𝐾,()
where fa isthetargetprobabilityoffalsealarmusedtosetthe
detection threshold. Equation () is obtained by assuming
that in the presence of at least one outlier the probability
of false alarm is equal to . As expected, the mean operator
shows a strong sensitivity to the /variations whereas the
median is robust to these uctuations. In particular, from
Figure it emerges that the probability of false alarm of the
mean energy detector already saturates for /=−5dB.
e analyses performed in Figures and highlight
the fact that the mean shows the greatest performance
International Journal of Antennas and Propagation
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9 p = 0.1
Mean-J/N = −10 dB
Mean-J/N = −5 dB
Mean-J/N = 0 dB
Mean-saturation
Median-J/N = 0 dB
Pfa Est
Pfa
F : Degradation in terms of false alarm probability as a
function of the /for a xed contamination probability, =0.1.
= 1MHz,=8. Probabilities of false alarm have been plotted
in logarithmic scale.
degradation in the presence of interference. ese results
clearly show the advantages of a robust detector in reducing
andcontrollingthefalsealarmprobabilityofthesystem.
6. System Architecture and Implementation
In order to prove the benets of robust energy sensing and
the possibility of implementing CR capabilities using a low-
cost front-end, a SDR system has been developed using the
Realtek RTLU device.
e system developed had to meet two basic require-
ments: (1) being able to operate in real-time and (2)allow-
ing data recording. Real-time operations are necessary to
obtain a preliminary analysis of the data streamed by the
Realtek RTLU device and demonstrate SS whereas data
recording is fundamental to allows postmission operations.
e samples collected using the Realtek RTLU device are
valuable data which can be used to design and test new SS
algorithms. For this reason, the general architecture depicted
in Figure has been adopted. e TV tuner is interfaced
to the main soware through dedicated drives. e API
provided by the OsmocomSDR Project []wasusedinaPC
implementation whereas the driver developed by Marinov
[] was adopted for the Android port of the spectrum sensor.
e API allows a user to set the dierent parameters of the
TV tuner including the centre and sampling frequencies.
A soware controller is used to progressively change the
signal centre frequency and to start the streaming of the I/Q
samples which are stored in a circular buer. e buer is
accessible via two dierent threads: the rst is used for real-
time processing whereas the second is responsible for storing
data to disk. (In the Android implementation, data are stored
on a Secure Digital (SD) card.) Data are stored according
to the format described in Figure (a): a synchronization
pattern is inserted at the beginning of each data block and
it is followed by the centre frequency of the samples. e
synchronization pattern is a sequence of bytes whereas the
centre frequency is saved as a -bit unsigned integer. e I/Q
samples are stored in an interleaved way and the size of each
data block is a parameter selectable by the user.
is architecture is very generic and allows both real-time
and postprocessing operations. e samples provided by the
Realtek RTLU device are a function of both time and
centre frequency and correspond to the samples, (𝑠,𝑐),
considered in Section .
e architecture detailed above has been implemented on
both PC and Android platforms. For the PC implementation,
SS capabilities have been implemented in the JRC Interfer-
ence Monitor (JIM) soware, a real-time platform is designed
for interference monitoring and extended here to process I/Q
samplesfromtheRealtekRTLUdevice.JIMhasbeen
developed in C++ using the Object Oriented Programming
(OOP) paradigm. e main elements of JIM are as follows.
(i) Afront-end: a hardware device providing samples to
the soware. Although this is not an element of the
soware, JIM has to be aware of the front-end used in
ordertoadoptthecorrectprotocolfordatastreaming.
(ii) SampleSources:theseobjectsprovideastandardso-
ware interface to the hardware device connected to
JIM. All the sample sources are derived from a base
class (“BaseSampleSource”) and thus have the same
basic interfaces. e main goal of a sample source is
toprovidethesamplestobeprocessed.
(iii) SampleConsumerDataProducers:theseobjectscon-
sume the samples provided by a SampleSource and
generate data which can be then displayed. An exam-
ple is the HistogramConsumer which uses the samples
provided by a SampleSource to compute their relative
frequencies (probabilities) of the input samples. e
HistogramConsumer produces a list of pairs contain-
ingthesamplevalueanditsrelativefrequency.ese
dataarethenreadytobedisplayedinsomeform.
(iv) DataDisplayer: these objects get the data from the
SampleConsumerDataProducers and either display
themonthescreenorsavethemtoale.
e processing chain describing the principles of operations
of JIM is shown in Figure . A screen-shot of the JIM
soware for SS is shown in Figure (a). e dierent views
ofthesowareareprogressivelyupdatedshowingthesignal
evolutionasafunctionoftheselectedcentrefrequency.
e Android soware has been developed in Java using
an architecture similar to that adopted for JIM. e main
activity of the Android implementation of the spectrum
sensor based on the Realtek RTLU front-end is shown
in Figure (b). e interface allows a user to set dierent
parameters such as the frequency range to sweep and the
sampling frequency. e application implements the robust
energy detection algorithms detailed in Section .
International Journal of Antennas and Propagation
Real-time
processor
Disc
storage
I/Q data
Soware
controller
Set centre
frequency
(a)
Synchronization
pattern
Centre
frequency
IQ samples
(b)
F : Architecture adopted for the real-time processing and storage of the I/Q samples streamed by the Realtek RTLU device. A
soware controller is used to scan a large frequency band. e data are stored according to the format detailed in the bottom part of the
gure.
SampleSource
Hardware
device
Shared circular buer
Continuous sample
streaming
SampleConsumer
DataProducer
SampleConsumer
DataProducer
SampleConsumer
DataProducer
Shared circular buer
Shared circular buer
Shared circular buer
Sample buer
Data buers
Continuous
data
streaming
Continuous sample
consumption
DataDisplayer
DataDisplayer
DataDisplayer
Continuous data
consumption
F : Processing chain implemented in the JIM soware.
7. Experimental Results
Several experiments were conducted to test the capabilities of
thesystemdevelopedandthesampleresultsareprovidedin
this section.
A rst set of experiments was conducted in order to
experimentally verify the validity of model ().Inpartic-
ular,wewereinterestedinshowingthepresenceofself-
interference, that is, that form of interference generated by the
front-end itself. For this reason, the antenna port of the Real-
tek device was terminated by a Ohm resistance. Moreover,
the device was closed in a box covered by RF absorbers as
shown in Figure .Inthisway,itwaspossibletomeasurethe
energy of the signal components generated by the device. In
Figure , the energy measured in the Ultra-High Frequency
(UHF) band is shown when the experimental setup shown in
Figure is adopted. e blue curve denoted as “Unltered”
shows the energy, (𝑐),computedusing() and with no
further processing. e sampling frequency of the Realtek
RTLU was set to 1.024 MHz in order to obtain a signal
bandwidth, ,closetothatinTab l e . Spurs and oscillator
artefacts are clearly visible; moreover, small variations in the
noise oor can be observed as a function of 𝑐. ese results
support the signal model adopted in Section .Itispossible
toobservethatspursoccuratregularintervalsspacedby
. MHz. is is the fundamental frequency of the crystal
oscillator mounted on the Realtek RTLU device.
Estimates of the total energy in a MHz bandwidth are
also provided in Figure . When the mean operator is used
for computing the total energy, spurs are still present. ese
artefacts can bias the detection process. e median operator
is an eective tool to remove those artefacts and frequency
spikesarenolongerpresent.Aerspikeremoval,theenergy
measured in Figure canbeusedtoestimatethenoise
International Journal of Antennas and Propagation
(a) (b)
F : (a) Screen-shot of the JIM soware for SS. e dierent views of the soware GUI are progressively updated showing the signal
evolution as a function of the selected centre frequency. (b) Main activity of the Android implementation of the spectrum sensor based on
the Realtek RTLU front-end. e spectrogram showing the energy estimated in the dierent bands is progressively depicted in the lower
part of the GUI.
F : e Realtek RTLU device was closed inside a box
covered by RF absorbers and with the antenna port closed by a
Ohm terminator.
variance, 2, as a function of the centre frequency, 𝑐.In
particular, 2has been estimated using the samples collected
using this setup, that is, in the absence of signal, and
accounting for the presence of interference. When the signal
is absent, 2can be estimated using () where the median has
been adopted to remove the impact of interference.
Note that the suitability of the Realtek RTLU device
for energy detection depends on the frequency band con-
sidered. For example, when the L band ([–] MHz)
is considered, the Realtek RTLU front-end has a signif-
icantly worse behaviour than in the UHF band. is fact is
highlighted in Figure where the noise energy measured
by the Realtek RTLU device is shown as a function of
thecentrefrequency.Alsointhiscase,theantennaportof
500 550 600 650 700 750 800 850
41
42
43
44
45
46
47
48
49
Frequency (MHz)
Energy (uncalibrated) (dB)
Unl tered
Mean
Median
F : Energy measured in the UHF band when the antenna
port of the Realtek RTLU device is terminated using a Ohm
resistance. =1MHz, =8.
the device was terminated with a Ohm resistance and
the TV tuner was covered by RF signal absorbers. Several
spikes are present and the noise oor does not show a regular
trend. In this case, the frequency spikes are approximately
. MHz, half the frequency measured for the UHF bands.
e median operator is able to eectively remove most of the
spikes present in the energy prole in Figure .
e detection capabilities of the device have been tested
usingrealandsimulateddata.Simulationswereperformed
using a hardware-in-the-loop approach. In particular, a
Universal Soware Radio Platform (USRP) device was used
International Journal of Antennas and Propagation
1100 1200 1300 1400 1500 1600 1700
49
50
51
52
53
54
55
56
Frequency (MHz)
Energy (uncalibrated) (dB)
Unl tered
Mean
Median
F : Energy measured in the L band when the antenna port
of the Realtek RTLU device is terminated using a Ohm
resistance. =1MHz,=8.
500 550 600 650 700 750
40
45
50
55
60
65
70
75
Frequency (MHz)
Energy (uncalibrated) (dB)
USRP TV
channel
Unl tered
Mean
Median
F : Energy measured in the UHF band when the antenna
port of the Realtek RTLU device is connected to a USRP
simulating a single TV channel. = 1MHz,=8.
to generate a useful signal component with the same spectral
characteristics of a TV channel. An example of the curves
obtained with this approach is shown in Figure .Here,the
signal presence is clearly detected. e channels adjacent to
the useful signal are only marginally aected by its presence
and the noise oor is consistent with the values measured in
Figure .
8. Conclusions
In this paper, SS has been demonstrated using a low cost TV
tuner. In particular, a Realtek RTLU device was used
as an agile front-end for scanning the UHF bands. A two-
stage energy detection scheme was proposed to improve the
robustness of the system and to deal with the spurs and
imperfections caused by the front-end oscillator. e use of
robust estimators, such as the median lter, allows a signif-
icant improvement, in terms of false alarm probability, with
respect to standard techniques. Real data and hardware-in-
loop simulations were used to test the system developed and
to characterize the performance of the algorithm proposed.
e advantages of robust detection techniques were clearly
shown.
e use of robust estimators can also be used in the
presence of narrowband wireless interference like CWs. e
application of the algorithms used in this paper in the
presence of wireless interference will be addressed in future
work. Future work also includes a better characterization of
the front-end with specic focus on the impact of Automatic
Gain Control (AGC) and the study of additional robust
techniques such as the myriad lter [].
Appendix
Mean and Variance of (𝑐)
In this Appendix, the mean and variance of (𝑐)are eval-
uated. For the analysis (𝑠,𝑐)isassumedtobeacomplex
CW:
𝑠,𝑐=exp 2𝑖𝑠+𝑖,(A.)
where 𝑖is the interference centre frequency and 𝑖is a
uniform random variable which spans the interval [−,].
e properties derived in this section are the basis of ().
e mean of (𝑐)can be computed as
E𝑐=E1
𝑁−1
𝑛=0 𝑠,𝑐2=1
⋅𝑁−1
𝑛=0 2
𝑠E𝑠,𝑐2
+2𝑐E𝑠,𝑐2+E𝑠,𝑐2
+2𝑠𝑐ER𝑠,𝑐∗𝑠,𝑐
+2𝑠ER𝑠,𝑐∗𝑠,𝑐
+2𝑐ER𝑠,𝑐∗𝑠,𝑐.
(A.)
e three components in () are independent and zero mean.
us the three cross-terms in (A.) are zero mean and
E[(𝑐)]becomes
E𝑐=22
𝑠+22+2𝑐. (A.)
International Journal of Antennas and Propagation
e variance of (𝑐)is given by
Var 𝑐=Var 1
𝑁−1
𝑛=0𝑠,𝑐2= 1
2
⋅𝑁−1
𝑛=0
Var 2
𝑠𝑠,𝑐2+2𝑐𝑠,𝑐2
+𝑠,𝑐2
+2𝑠𝑐R𝑠,𝑐∗𝑠,𝑐
+2𝑠R𝑠,𝑐∗𝑠,𝑐
+2𝑐R𝑠,𝑐∗𝑠,𝑐.
(A.)
In (A.), the variance operator has been moved aer the
sum used for computing the energy. is operation is
possible since (𝑠,𝑐)and (𝑠,𝑐)are assumed to be
white sequences. Although (𝑠,𝑐)is a highly correlated
sequence,itappearsinthevariancecomputationmultiplied
by (𝑠,𝑐)and by (𝑠,𝑐).Inthiscase,theresulting
sequences are white. Moreover, term |(𝑠,𝑐)|2is equal to
andthushasnoimpactonthevariancecomputation.ese
properties justify the commutation between the summation
and the variance operator. In addition to this, the six terms in
(A.) are uncorrelated and thus the total variance is equal to
the sum of the variances of such components. In particular,
Var 2
𝑠𝑠,𝑐2
=4
𝑠Var 2
𝑖𝑠,𝑐+2
𝑞𝑠,𝑐
=2Var 2
𝑖𝑠,𝑐
=24
𝑠E4
𝑖𝑠,𝑐−E22
𝑖𝑠,𝑐
=24
𝑠[3−1]=44
𝑠,
(A.)
where 𝑖(𝑠,𝑐)and 𝑞(𝑠,𝑐)are the real and imaginary
parts of the useful signal, (𝑠,𝑐).Similarly,itispossibleto
prove
Var 𝑠,𝑐2=44.(A.)
e interference term has a constant modulus and thus its
variance is zero. e variance of the cross-terms involving
(𝑠,𝑐)can be computed as
Var 2𝑠𝑐R𝑠,𝑐∗𝑠,𝑐
=42
𝑠2𝑐⋅1
2Var 𝑠,𝑐∗𝑠,𝑐
=42
𝑠2𝑐.
(A.)
e rotation on (𝑠,𝑐)performed through the multiplica-
tion by ∗(𝑠,𝑐)hasnoimpactonthevariancebecauseof
the assumption of circular symmetry. Similarly,
Var 2𝑐R𝑠,𝑐∗𝑠,𝑐
=422𝑐. (A.)
Finally, the signal and noise cross-term has variance
Var 2𝑠R𝑠,𝑐∗𝑠,𝑐=82
𝑠2.(A.)
Using these results, it is nally possible to compute the vari-
ance of (𝑐):
Var 𝑐
=1
44
𝑠+44+42𝑐2
𝑠+2+82
𝑠2
=4
2
𝑠+22
𝑠+2+𝑐.
(A.)
Conflict of Interests
e authors declare that there is no conict of interests
regarding the publication of this paper.
References
[] S. Haykin, “Cognitive radio: brain-empowered wireless com-
munications,” IEEE Journal on Selected Areas in Communica-
tions,vol.,no.,pp.–,.
[] T. Y¨
ucek and H. Arslan, “A survey of spectrum sensing algo-
rithms for cognitive radio applications,” IEEE Communications
Surveys and Tutorials, vol. , no. , pp. –, .
[] F. Gao, J. Li, T. Jiang, and W. Chen, “Sensing and recognition
when primary user has multiple transmit power levels,” IEEE
Transactions on Signal Processing,vol.,no.,pp.–,
.
[] E. Rebeiz and D. Cabric, “How wideband receiver nonlinearities
impact spectrum sensing,” in Proceedings of the 1st IEEE Global
Conference on Signal and Information Processing (GlobalSIP ’13),
pp. –, Austin, Tex, USA, December .
[] E. Rebeiz, A. S. H. Ghadam, M. Valkama, and D. Cabric, “Sup-
pressing RF front-end nonlinearities in wideband spectrum
sensing,” in Proceedings of the 8th International Conference on
Cognitive Radio Oriented Wireless Networks and Communica-
tions (CROWNCOM ’13),pp.–,July.
[]S.-K.Ting,D.Cabric,andA.Sayed,“Analgorithmtocom-
pensate the eects of spurious PLL tones in spectrum sensing
architectures,” IEEE Transactions on Circuits and Systems. I.
Regular Papers,vol.,no.,pp.–,.
[] OsmocomSDR Project, , http://sdr.osmocom.org/trac/wiki/
rtl-sdr.
[] G. R. Arce, Nonlinear Signal Processing: A Statistical Approach,
Wiley-Interscience, Hoboken, NJ, USA, .
[] S. Dikmese, P. C. Sofotasios, T. Ihalainen, M. Renfors, and
M. Valkama, “Ecient energy detection methods for spectrum
sensing under non-at spectral characteristics,” IEEE Journal on
Selected Areas in Communications,vol.,no.,pp.–,
.
[] E.Axell,G.Leus,E.G.Larsson,andH.V.Poor,“Spectrumsens-
ing for cognitive radio: state-of-the-art and recent advances,”
IEEE Signal Processing Magazine,vol.,no.,pp.–,.
[] R. Dion´
ısio, J. Ribeiro, P. Marques et al., “Sensing algorithms
for TVWS operations,” Project Deliverable D., COGEU FP
ICT-.., .
[] S. M. Kay, Fundamentals of Statistical Signal Processing, Volume
2: Detection eory,vol.,PrenticeHall,UpperSaddleRiver,NJ,
USA, .
International Journal of Antennas and Propagation
[] P. W. Ward, “Design technique for precise GNSS receiver post-
correlation noise oor measurements with usage design exam-
ples by the search and tracking processes,” in Proceedings of the
International Technical Meeting of e Institute of Navigation,
pp.–,SanDiego,Calif,USA,January.
[] J. Jiang, H. Sun, D. Baglee, and V. Poor, “Achieving autonomous
compressive spectrum sensing for cognitive radios,” IEEE
Transactions on Vehicular Technology,.
[] S. Wei, D. L. Goeckel, and P. A. Kelly, “Convergence of the com-
plex envelope of bandlimited OFDM signals,” IEEE Transac-
tions on Information eory,vol.,no.,pp.–,.
[] R. A. Maronna, R. D. Martin, and V. J. Yohai, Robust Statistics:
eory and Methods, John Wiley & Sons, Hoboken, NJ, USA,
.
[] M. Marinov, “RTLU driver—rtl tcp and libusb-. port for
Android modied to support opening devices from Linux le
descriptors,” , https://github.com/martinmarinov/rtl tcp
andro-.