Professional Documents
Culture Documents
A Thesis
Master of Science
in
Electrical Engineering
by
Zhanwei Sun,
c Copyright by
Zhanwei Sun
2010
All Rights Reserved
Abstract
by
Zhanwei Sun
Spectrum sensing is a critical function for enabling dynamic spectrum access
(DSA) in a cognitive radio system. In DSA networks, unlicensed secondary users
can gain access to a licensed spectrum band as long as they do not cause harmful interfere to the primary users. Although existing research has demonstrated
the utility of a Markov chain for modeling the spectrum access pattern of primary
users over time, little effort has been directed toward spectrum sensing based upon
such models. In this thesis, we develop several sequence detection algorithms for
spectrum sensing in DSA networks. We assign different costs for missed detections
and false alarms and show that a suitably modified forward-backward sequence
detection algorithm is optimal in minimizing the detection risk. Two advanced
sequence detection algorithms, the complete forward algorithm and the complete
forward partial backward algorithm are introduced. Along the way, we observe
new fundamental limitations that we call the risk floor and the window length
limitation of traditional physical layer detection schemes that arise from their
mismatch with the primary users channel access pattern. We also report results from preliminary experiments in which we implement and compare different
detectors using a software-defined radio platform.
To my family,
and my best friends,
those I love and those who love me.
ii
CONTENTS
FIGURES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TABLES
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
vii
ACKNOWLEDGMENTS . . . . . . . . . . . . . . . . . . . . . . . . . . .
viii
CHAPTER 1: INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . .
CHAPTER 2: BACKGROUND . . . . . . . . . . . . . . . .
2.1 Cognitive Radio and Dynamic Spectrum Access . .
2.2 Spectrum Sensing for Dynamic Spectrum Access . .
2.2.1 PHY Layer Sensing . . . . . . . . . . . . . .
2.2.2 Energy Detection . . . . . . . . . . . . . . .
2.2.3 MAC Layer Sensing . . . . . . . . . . . . . .
2.2.4 Cooperative Sensing . . . . . . . . . . . . .
2.3 Software-Defined Radio . . . . . . . . . . . . . . . .
2.3.1 Cognitive Radio and Software-Defined Radio
2.3.2 GNU Radio and USRP . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
iii
5
5
9
10
12
15
17
19
21
22
24
24
24
26
28
29
31
33
33
35
37
39
3.4.1
3.4.2
.
.
.
.
48
48
51
52
57
57
59
59
60
62
66
70
72
72
73
83
83
83
84
84
86
86
87
87
88
BIBLIOGRAPHY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
91
iv
. . . . . . . .
and Coherent
. . . . . . . .
. . . . . . . .
. . . . . .
Detection
. . . . . .
. . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
41
44
FIGURES
1.1
2.1
. . . . . . . . .
2.2
2.3
Two realizations of energy detection. a) Implementation with analog pre-filter and square-law device. b) Implementation using FFT
magnitude squared and averaging . . . . . . . . . . . . . . . . . .
13
2.4
22
3.1
28
3.2
34
3.3
37
3.4
38
3.5
39
Two cases leading to false alarms for energy detection when the PU
state changes during a sensing window. . . . . . . . . . . . . . . .
46
49
52
Performance for CFA and CFPB. E[L0 ] = 200, E[L1 ] = 100, C01 =
10, C10 = 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
53
Performance for CFA and CFPB. E[L0 ] = 200, E[L1 ] = 100, C01 =
10, C10 = 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
54
The risk floor for energy detection. E[L0 ] = 2000, E[L1 ] = 1000,
T = 10, C01 = 10, C10 = 1. . . . . . . . . . . . . . . . . . . . . . .
55
3.6
4.1
4.2
4.3
4.4
4.5
4.6
The risk floor for energy detection. E[L0 ] = 2000, E[L1 ] = 1000,
T = 100, C01 = 10, C10 = 1. . . . . . . . . . . . . . . . . . . . . .
56
5.1
Packet format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
60
5.2
61
5.3
62
5.4
65
5.5
. . . . . . . . . . .
68
5.6
71
5.7
Risk level for energy detectors with different sensing window length. 74
5.8
System setup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
75
5.9
76
77
78
79
80
5.14 Estimated detection risks of energy detection, complete forward sequence detection algorithm and complete forward partial backward
sequence detection algorithm. . . . . . . . . . . . . . . . . . . . .
82
85
vi
TABLES
5.1
5.2
vii
. . . . . . . . . .
. . .
63
80
ACKNOWLEDGMENTS
On writing the thesis, I would like to express my sincere gratitude and thanks
to my advisor Dr. J. Nicholas Laneman for his support and guidance in research,
help and patience in life. Not only did I learn a lot from discussion with him, but
he helped me overcome some difficult time in life. He is a great life coach and
friend as he is an academic advisor!
Many thanks should go to Glenn Bradford, for his constant help in the experimentation and others as well. Without his help, this thesis could not have been
done. I would also like to thank Ioannis Krikidis, Michael Dickens, Brian Dunn,
Matthieu Bloch, Ebrahim MolavianJazi and Utsaw Kumar, since I benefit a lot
from interacting with these group members.
Special thanks go to Ke Chen, for his cares and willingness to help in this
process, and to Yaou Zhou, for her thoughtful help and encouragement during the
hard time. Thank Ke Lang and Jun Geng for caring, understanding, supporting and valuing me and being my best friends for more than ten years! Thank
Fangxue Zheng, Xian Jiang, Ming Gan, Xiao Fang, Xue Xiao, Yuan Liu, Yuzhe
Liu, Zhisheng Lin and Li Yu. Your friendship makes my life in US exciting and
memorable! Thank my US brother John Bales and his wife Holly Bales for hosting
me and making me feel at home. Their love and support means a lot to me.
Aboveall, thank my parents. Your love is the greatest gift in my life!
viii
CHAPTER 1
INTRODUCTION
Though the natural frequency spectrum is a limited resource, the demand for
extra spectrum is ever increasing with the rapid growth of wireless applications and
services. In the current spectrum regulatory framework, all the frequency bands
are exclusively allocated to specific services by governmental regulators. However,
the actual licensed spectrum is spectrally inefficient due to spatial and temporal
variation in utilization by licensed primary users (PUs). One report of the Federal
Communications Commission (FCC) suggests that the utilization of allocated
spectrum ranges from 15% to 85% [9]. In [4], the authors provide real world
spectrum usage measurements averaged over six locations and the result is shown
in Figure [? ]. Cognitive Radio (CR) and Dynamic spectrum access (DSA) [3, 32]
are promising approaches to spectrum scarcity problem by allowing unlicensed,
secondary users (SUs) to opportunistically access the inefficiently used licensed
spectrum as long as they do not cause harmful interference to PUs. SUs employing
DSA must accurately sense spectrum opportunities, often called spectrum holes,
corresponding to gaps in PU transmissions.
Spectrum sensing algorithms seek to balance the conflicting goals of minimizing
interference to PUs while maximizing the rate of SUs. Performance of a sensing
algorithm is typically characterized in terms of the probability of missed detection
Pm , i.e., failing to sense the existence of an active PU and thus causing interference,
1
Figure 1.1. Real world spectrum usage measurements averaged over six
locations.
and the probability of false alarm Pf , i.e., falsely declaring that a PU is active
and thus missing a spectrum opportunity. The inherent tradeoff between Pm
and Pf for any detector leads to a tradeoff between these two aspects of system
performance.
Spectrum sensing is best addressed as a cross-layer design problem. Various
types of physical (PHY) layer, medium access control (MAC) layer, and crosslayer sensing approaches exist in the literature. However, few of them take into
consideration the PUs channel access pattern. Instead, they typically assume
that PUs remain in one state during a sensing period, regardless of the length
of a sensing window. Classical PHY layer spectrum sensing approaches for a
non-cooperating SU, such as coherent and energy detection [5], generally assume
that any operating pair (Pf , Pm ) is achievable at a given signal-to-noise ratio
(SNR) as long as a suitably long observation window is allowed. But in practice,
a PUs access pattern is likely to be bursty, and not staying in one state for
long. Therefore, the observation length, and thus performance of these classical
approaches, will be limited by the PUs channel dwell time, which refers to the
time duration that the PU remains in a particular state, whether ON or OFF.
This type of bursty transmission can be modeled as a Markov Chain [14] and
recent real-time measurements collected in the paging band (928-948 MHz) also
validates its appropriateness [7].
The primary contribution of this thesis is to develop several sequence detection
algorithms derived from the well-known forward-backward algorithm and apply
them to the problem of spectrum sensing in cognitive radio networks. These sequence detection algorithms outperform the classical PHY layer sensing schemes
by fully exploiting the Markov memory modeling the PUs channel access pat-
tern. Furthermore, by assigning different cost factors for missed detections and
false alarms, the proposed sequence detection algorithms allow for operation at
different (Pf , Pm ) pairs. Comparisons among energy detection and the proposed
sequence detection algorithms are provided using theory, simulations, and preliminary experiments on a software radio platform. Along the way, new limitations
for classical PHY layer sensing schemes are characterized.
The remainder of this thesis is organized as follows. Chapter 2 provides background on cognitive radio and software radio, focusing on algorithms for spectrum
sensing and the GNU radio platform used for experiments, respectively. Chapter 3
describes the proposed weighted sequence detection algorithms for spectrum sensing. It also describes some limitations for traditional PHY layer sensing schemes.
Chapter 4 provides some simulation results, which show the advantage of the new
sequence detection algorithms over the energy detection and coherent detection.
Chapter 5 describes an experimental setup for implementing energy detection and
the proposed sequence detection algorithms. A simplified version of the sequence
detection algorithms is implemented and several experimental results are provided.
Chapter 6 concludes the thesis and discusses directions for future research.
CHAPTER 2
BACKGROUND
bands as long as they do not cause any harmful interference to primary users (also
called licensed users). Hence, dynamic spectrum access can be viewed as a subset
of cognitive radio.
Figure 2.1 illustrates a simple, yet typical dynamic spectrum access network
that consists of a pair of primary user and a pair of secondary user. They operate
at exactly the same frequency band. The primary user has higher priority accessing the spectrum. The secondary user has to sense the spectrum and transmit
only if it detects a spectrum hole. Miss detections from the secondary user will
cause interference to the primary user as shown in the figure.
Strictly speaking, there is no agreement on the formal definition of cognitive
radio as for now. The concept of ultimate cognitive radio should include vari-
ous meanings in several contexts. One main aspect is to exploit locally unused
spectrum to provide opportunistic spectrum access. Other aspects include interoperability across several networks, roaming across borders while being able to
stay in compliance with local regulations, adapting the system, transmission, and
reception parameters without user intervention, and having the ability to understand and follow actions and choices taken by their users to learn how to become
more responsive over time.
In [1], cognitive radio is defined as an intelligent wireless communication system that is aware of its surrounding environment and uses the methodology of
understanding-by-building to learn from the environment and adapt its internal
states to statistical variations in the incoming RF stimuli by making corresponding
changes in certain operating parameters (e.g., transmit-power, carrier-frequency,
and modulation strategy) in real-time.
Figure 2.1 shows the tasks required for cognitive radio in open spectrum. It
is referred to as the cognitive cycle [1], [20]. In the spectrum analysis, modeling
and learning step, the cognitive radio measures the spectrum, estimates the PUs
transmission parameters and models the PUs transmission structure through observations over a long time period. This information is then used to formulate the
threshold in the spectrum sensing, channel predication step. Finally, in the spectrum management, cognitive transmission step, the cognitive radio adapts itself
to transmit in the open band, potentially changing its carrier frequency, transmit
power, modulation type and packet length. If multiple SUs exist, they must share
the spectrum according to some channel access protocol.
Radio environment:
Primary users and
other secondary users
Channel allocation,
power and packet
length control
RF stimuli
RF stimuli
Spectrum management,
cognitive transmission
Spectrum analysis
modeling, and learning
channel capacity
Spectrum sensing,
channel prediction
utilizing a white space, it no longer has a choice regarding the sensing mode and
has to sense the channel proactively at periodic intervals since it needs to vacate
its transmission as soon as any primary users reclaim that channel [4]. Therefore,
the application characteristics may prevent a SU with a reactive sensing scheme
from joining in the cooperation.
Spectrum sensing can be realized as a two-layer mechanism [8]. PHY layer
sensing focuses on efficiently detecting PU signals. Several well-known PHY layer
detection methods such as energy detection, coherent detection, and feature detection have been extensively investigated [5], [6], [9], [10]. On the other hand,
MAC layer sensing determines when SUs have to sense which channels and for
how long.
10
knowledge of primary signal at both PHY and MAC layers, such as modulation
scheme, pulse shape and packet format. Moreover, for demodulation it has to be
synchronized with primary signal in timing and carrier frequency [9]. Therefore,
it is very vulnerable to uncertainty and changes in the primary signal and the
timing and frequency offset. Furthermore, a different detector is required in order
to detect each PU (or other SUs in the same cognitive radio system). This makes
coherent detection undesirable if multiple primary systems are to be sensed.
By definition in [22], a cyclostationary signature is a feature, intentionally embedded in the physical properties of a digital communications signal, which may
be easily generated, manipulated, detected and analyzed using low complexity
transceiver architectures. This feature is present in most transmitted signals, requires little signaling overhead, and may be detected using short signal observation
times. Cyclostationary signatures are an effective tool for overcoming a number
of the principal challenges associated with cognitive network and dynamic spectrum access applications. By taking advantage of the inherent cyclostationarity
existent in digital signals, feature detection has the potential to provide reliable
signal classification even at low SNR [23]. Feature detection outperforms energy
detection by exploiting an inherent periodicity in the primary users signal. However, cyclostationary detections improved performance is at the cost of increased
complexity.
In [24], the author proposed a blind sensing algorithm based on oversampling
the received signal. The proposed algorithm uses a novel combination of oblique
projection and QR decomposition based approach to handle bandlimited signals.
This algorithm does not require any a priori knowledge of the primary signal or
the channel and noise power. In fact, the estimation is just involved in two signal
11
statistics based on the oblique projection operator. One signal statistic provides
an estimate of the primary signal present in the received data. The other signal
statistic provides an estimate of the noise variance, even if the received signal
contains both signal and noise.
Other blind sensing methods are based on the eigenvalues of the covariance
matrix of the received signal [25]. The Maximum-Minimum Eigenvalue (MME)
detection algorithm is based on the ratio of the maximum eigenvalue to minimum
eigenvalue, and the Energy with Minimum Eigenvalue (EME) detection algorithm
is based on the ratio of average power of the received signal to the minimum
eigenvalue.
Similar to energy detection, both MME and EME are blind detection methods
that only use the received signal samples but limited information on the transmitted signal and channel. MME and EME outperform energy detection in two
ways. First, energy detection needs the noise power for decision while MME and
EME do not. In fact, estimation of noise power is naturally embedded in these
methods. As a result, MME and EME are robust to noise uncertainty and variation. Second, MME and EME also provide better performance if the signal to be
detected are highly correlated [25]. Of course, these advantages are at the cost of
increased complexity.
12
test statistic
y(t)
A/D
| |2
Average N
samples
Comparator
sensing
result
(a)
test statistic
y(t)
A/D
FFT
Average M
bins N times
| |2
Comparator
sensing
result
(b)
H0 : Yt = Wt ,
t = 1, 2, ..., T,
signal absent
H1 : Yt = Xt + Wt ,
t = 1, 2, ..., T,
signal present
(2.1)
where T is the observation length. The test statistic for an energy detector is
Z(y) =
T
X
|Yt |2
(2.2)
t=1
13
The noise samples Wt are assumed to be additive, white and Gaussian with
zero mean and variance w2 . For a simplified analysis, the signal samples Xt can
also be modeled as uncorrelated zero mean Gaussian random process with variance
x2 [5]. Based on these assumptions, the decision statistic Z follows central chisquare distribution with 2T degrees of freedom under H0 and non-central chisquare distribution with 2T degrees of freedom and a non-central parameter of 2
under H1 [28], i.e.,
Z
22T ,
H0 ,
22T (2),
H1 .
(2.3)
(2.4)
The well-known limitation for energy detection is the SNR wall caused by
uncertainties in background noise power [6]. SNR Wall is the smallest power
under which the signal cannot be detected. Energy detection relies on accurate
knowledge of the noise power. The threshold for energy detection is based on the
assumption that the noise variance is known precisely to the receiver. However,
this is impossible in practice since noise might vary over time due to factors
such as interference of nearby unintentional transmissions and far-away intentional
transmissions, as well as non-uniform and time varying thermal noise. Other
14
challenges with energy detection include selection of the threshold and inability
to detect spread spectrum signals.
15
channels to probe, in what order, when to stop, and upon stopping, which channel
to use before each cognitive transmission starts. The optimal strategy is shown
to have a threshold structure.
In [8], the authors address the issue of how to maximize the discovery of spectrum opportunities by sensing-period adaptation and how to minimize the delay
in finding an available channel. By considering the underlying ON-OFF PUs
channel usage patterns, they develop a sensing-period optimization mechanism
and an optimal channel-sequencing algorithm, as well as an environment adaptive channel-usage pattern estimation method. We also model the channel access
pattern as alternating ON-OFF periods. However, the authors in [8] consider a
general case while we model the channel access pattern as Markov chain. Moreover, we utilize the Markov property in PHY layer rather than MAC layer.
In [12], the authors propose a MAC layer sensing scheme called Extended
Knowledge-Based Reasoning (EKBR) to improve the fine sensing efficiency by
jointly considering a number of network states and environmental statistics, including fast sensing results, short-term statistical information, channel quality,
data transmission rate, and channel contention characteristics. The proposed
scheme is shown to achieve efficient spectrum sensing by making certain tradeoffs
between data transmission rate and sensing overhead.
In [13], the authors formulate the spectrum sensing and transmission problems
together as an optimal stopping algorithm that aims to maximize the average
reward per unit time with a constraint on the collision cost. Specifically, a reward
is received by a SU for each successful transmission and a penalty is received for a
collision with the PU. The collision cost can be used to control the aggressiveness of
the SU access and to limit the interruption on PU transmission. The scheme works
16
17
Soft combination. SUs exchange all of their raw observation data to the
fusion center. This will introduce huge overhead and is rarely used in practice. Its main application is to analytically give an upper bound on the
performance of cooperation.
Softened hard combination. Here 2-3 bits of individual sensing information
are exchanged. Less information is lost at each SU compared to hard combination, resulting in performance improvement. The authors in [30, 31] show
that 2-3 bits of sensing data can achieve a good tradeoff between detection
performance and complexity.
Fusing data and making the final sensing decision is conducted at the fusion
center. The simplest way for the fusion center to make a decision is 1-out-ofN rule [30] for which the primary signal will be declared present if any one of
the cooperative SUs decides locally that primary signal exists. In practice, more
sophisticated fusion rules are needed in order to combine all the individual sensing
results.
Cooperation makes spectrum sensing for dynamic spectrum access robust to
severe or poorly modeled fading environments without drastic requirements on
individual radios. It also decreases the SNR wall and reduces the average sensing
time for a single secondary user. All these benefits, however, come at the cost of
additional overhead for exchanging information among SUs.
Firstly, though hard combination and softened hard combination schemes have
been proposed to reduce the bandwidth of the control channel in cooperative sensing methods, the overall band resources allocated to different SUs for information
exchange may be significant However, by nature of the dynamic spectrum access networks, dedicated spectrum for a control channel may not be available and
18
19
bility. To achieve the required flexibility, the boundary of digital processing should
be moved as close as possible to the antenna, and application specific integrated
circuits, which are traditionally used for baseband signal processing, should be
replaced with programmable implementations [29].
An example of a potential real-world SDR application is mentioned in [27],
where the software in a cellular phone could define the parameters under which
the phone should operate in real time as it moves from place to place. It is more
flexible than todays cellular phone, in which the operating frequency band and
the protocols are fixed.
Compared to hardware radio in which the radio can perform only a single
or a very limited set of radio functionality, SDR is built around software based
digital signal processing along with software tunable radio frequency components.
Hence, SDR represents a very flexible and generic radio platform that is capable
of operating with many different bandwidths over a wide range of frequencies
and using many different modulation and waveform formats. As a result, SDR
can support multiple standards, i.e., GSM, EDGE, WCDMA, CDMA2000, WiFi, WiMAX and multiple access technologies such as Time Division Multiple
Access (TDMA), Code Division Multiple Access (CDMA), Orthogonal Frequency
Division Multiple Access (OFDMA), and Space Division Multiple Access (SDMA)
[32].
An ideal SDR architecture consists of three main units, which are reconfigurable digital baseband radio, software tunable RF front end along with embedded
impedance synthesizer, and software tunable antenna systems. The reconfigurable
digital baseband radio performs digital radio functionalities such as different waveform generation, optimization algorithms for software tunable radio and antenna
20
units, and controlling of these units. The software tunable analog front-end system is limited to the components that cannot be performed digitally using current technology such as RF filters, Power Amplifier (PA), Low Noise Amplifiers
(LNA), and data converters. The impedance synthesizer is used to optimize the
performance of software tunable antenna systems for an arbitrary frequency plan
specified by the cognitive engine.
However, due to the current limitations (size, cost, power, performance, processing time, data converters), ideal SDR architectures are costly [32]. There are
various practical SDR platforms available in the market that are somewhat removed from ideal, but nevertheless allow for development and experimentation in
the laboratory.
21
Antenna
Transmit RF
Front End
DAC
Software Code
Antenna
Receive RF
Front End
ADC
Software Code
bit ethernet port. Various plug-in daughterboards allow the USRP and USRP2
to be used on different radio frequency bands. Daughterboards are available from
DC to 5.9 GHz. Basically, the USRP is an integrated board that incorporates
analog-to-digital converters (ADC) and digital-to-analog converters (DAC), some
forms of RF front end and an FPGA which does some important but computationally expensive pre-processing of the input signal [35]. A USRP board consists
of one mother board and up to four daughter boards (2 RX daughter boards and
2 TX daughter boards). The mother board provides the DC power input and
the USB 2.0 interface. The daughter boards come in transmitter, receiver, and
transceiver varieties. The daughter boards provide filtering of the received signal
and conversion from RF to IF and vice-versa. The implementation in this thesis was performed with the FLEX400 daughterboard [34], which is a transceiver
capable of operating in the 400MHz ISM band with a peak output power of 100
mW.
There are 4 high-speed 12-bit ADCs on the mother board, with the sampling
rate of 64M samples per second. In principle, it could digitize a band as wide as
32MHz. The USB link can support data rate of 32 MBytes/sec. All samples sent
over the USB interface are 16-bit signed integers in IQ format, i.e. 16-bit I and
16-bit Q data (complex), resulting in a maximum rate of 8M complex samples per
second across the USB [35].
23
CHAPTER 3
SEQUENCE DETECTION ALGORITHMS
This chapter describes the new sequence detection algorithms for spectrum
sensing in a dynamic spectrum access network. Two advanced sequence detection
algorithms, complete forward algorithm and complete forward partial backward
algorithm are introduced as well. The performances of the proposed algorithms are
compared with that of the traditional energy detection and coherent detection.
In doing so, we observe new limitations for the traditional PHY layer sensing
schemes that do not account for the PUs channel access pattern. We call these
new limitations the risk floor and the window length limitation. Their existence
is verified in the two following chapters.
24
(3.1)
p00 p01
P=
,
p10 p11
26
(3.2)
where pij is the transition probability from state i to state j. Let the random
variables L0 and L1 denote the time duration that the PU resides at an OFF and
an ON state, respectively. Since the transitions between ON and OFF periods
of the PU are assumed to follow a first-order Markov process, L0 and L1 will be
geometrically distributed with parameters p01 and p10 , respectively, i.e., E[L0 ] =
1/p01 and E[L1 ] = 1/p10 , where E[] is the expectation of a random variable.
Though Markov chain is appropriate in modeling the PUs channel access
pattern, the true states of the PU are never known to the SU at any particular
sampling instant. What the SU can observe directly is some signal emitted from
a particular state. In this thesis, we model the signal received at the SU to be a
noisy version of the PUs actual signal, i.e.,
Yt = S t Xt + W t ,
(3.3)
27
(3.4)
Hidden State
p01
p00
0
p10
fY |S (y|0)
p11
fY |S (y|1)
y
Observation
(i)
2
X
(3.5)
j=1
Our objective is to find the state sequence that minimizes the associated sequence
risk given the observation sequence Y = y, i.e.,
(3.6)
s(i) , 1i2T
Generally, the minimization is taken over a set with a total number of elements 2T ,
the computation time of which increases exponentially with the sequence length
T . However, there are some special cases for which linear computation time
algorithms exist.
C ij =
0, if s(i) = s(j)
1, if s(i) 6= s(j)
29
(3.7)
i.e., all possible sequence errors are given the same weight, then the risk function
becomes
R(s(i) |Y ) =
P (s(j) |Y ) = 1 P (s(i) |Y ).
(3.8)
j6=i
(3.9)
(3.10)
(3.11)
j{0,1}
with initialization
To retrieve the state sequence, we need to keep track of the argument t (i) that
30
(3.12)
j{0,1}
At the end of the algorithm, the highest probability endpoint is chosen and the
highest probability path (state sequence) is backtracked:
(3.13)
i{0,1}
St = t+1 (St+1 ),
t = T 1, T 2, , 1.
(3.14)
In practice, the logarithmic version of the Viterbi algorithm is often used due
to its lower computational complexity and better numerical stability. The major
drawback to using the Viterbi algorithm for spectrum sensing is it does not allow
costs to be differentiated based on the types or numbers of errors. We have
mentioned previously that missed detection errors may be much more costly to a
spectrum sensing system than false alarms, which motivates development of other
algorithms for such applications.
C ij = C(s(i) , s(j) ) =
T
X
(i)
(j)
C(st , st ),
(3.15)
t=1
(i)
where st is the state of the sequence s(i) at time t and Cij = C(i, j) is the cost
of declaring state i when the real state is j at any time instant. Define Rt (i|Y )
as the symbol risk function of declaring state i at time instant t, 1 t T , given
31
Rt (i|Y ) =
(3.16)
j{0,1}
The sequence risk function can thus be written as a sum of the symbol risk functions:
R(s |Y ) = E[
(i)
T
X
(i)
C(st , St )|Y ]
t=1
T
X
(i)
E[C(st , St )|Y ]
t=1
T
X
(i)
C(st , st )P (St = st |Y )
t=1 st {0,1}
T
X
(i)
Rt (st |Y ),
(3.17)
t=1
(i)
where st {0, 1}. This result demonstrates that if the sequence cost is additive,
the sequence risk function is also additive under the reasonable assumption that
all symbol risks are non-negative. Therefore, the state sequence can be estimated
in a symbol-by-symbol fashion
(3.18)
i{0,1}
The symbol a posterior probability P (St = i|Y ) in Equation (3.16) can be calculated using the well-known forward-backward algorithm [17]. This algorithm has
three steps:
1. Compute forward probabilities for each instant.
2. Compute backward probabilities for each instant.
32
3. Compute the a posterior probability of each state for each instant based
upon the forward and backward probabilities.
These three steps are now summarized in more detail based upon [17].
(3.19)
t (i) is proportional to the likelihood of the past observations and can be solved
recursively according to
(3.20)
(3.21)
j{0,1}
33
(3.22)
t1 (0)
p 10f Y |S
p0
1f
Y
)
(y t|0
p 10f Y |S
p0
yt |
1)
1f
Y
|S (
yt
+1
t (1)
t+1 (0)
|S (
t1 (1)
t (0)
|0
(y t+1
|1)
t+1 (1)
t1 (0)
p 10f Y |S
p0
1
t1 (1)
t (0)
1f
Y
)
(y t|0
p 10f Y |S
p0
|S (
yt |
1)
p11 fY |S (yt+1 |1)
t (1)
t+1 (0)
1f
Y
|S (
yt
+1
|0
(y t+1
|1)
t+1 (1)
t (i) =
(3.23)
j{0,1}
34
fY (y) =
T (i)
i{0,1}
i{0,1}
t (i)t (i)
(3.24)
i{0,1}
for any 1 t T .
Let t (i) be the a posterior probability that the hidden state at time t is i for
the given observation sequence Y = y up to time T ,
fY ,St (y, i)
t (i)t (i)
=
.
fY (y)
fY (y)
(3.25)
i{0,1}
Cij t (j).
(3.26)
j{0,1}
35
(3.27)
and is therefore a symbol-MAP detector that does not differentiate missed detections and false alarms. With costs assigned to the four different possibilities, our
decision rule (3.18) for additive cost sequence detection corresponds to a more
general form of the symbol-MAP detection rule. It is trivial to prove that if
C00 = C11 = 0 and C01 = C10 = 1, (3.18) reduces to (3.27).
It is also worth noting that provided a hardware realization for the symbolMAP detection algorithm, it can be readily extended to the additive cost sequence
detection algorithm by converting the symbol a posterior probability for each state
into the symbol risk for each state via Equation (3.16).
Since Cij is the cost of declaring state i when the real hidden state is j, C01
and C10 are the costs for missed detection and false alarm, respectively. For DSA
systems, it is natural to assign C00 = C11 = 0 and C01 a higher cost than C10 ,
since missed detections may cause more harm than false alarms. Essentially, it is
the ratio between the costs of missed detection and false alarm that affects the
operating point. Intuitively, the larger C01 is relative to C10 , the more the additive
cost sequence detection algorithm is biased toward reducing Pm at the expense of
increasing Pf . In the extreme case, if the cost for a missed detection is arbitrarily
large, the algorithm will always declare the PU to be present, giving Pf = 1 and
Pm = 0. On the other hand, if the cost for a false alarm is arbitrarily large,
the algorithm will always declare the spectrum to be available, giving Pf = 0
and Pm = 1. By varying the relative costs, we obtain different operating pairs of
(Pf , Pm ) corresponding to different points on the receiver operating characteristic
(ROC) curve for the sequence detector.
36
PU Active / Channel ON
Sensing Window Sensing Window Sensing Window Sensing Window Sensing Window Sensing Window
37
PU Active / Channel ON
Sensing Window
In the worst case, the average computation time for a sliding rule can be T
times as large as that of a block rule. However, more efficient algorithms exist
for both energy detection and weighted sequence detection. For energy detection,
we can use a moving average to eliminate reduplicate computations. For our
sliding weighted sequence detection algorithm, we are really only interested in the
decision at the current time instant. Thus it may not be necessary to calculate
any backward probabilities and only the forward probabilities for the states at
the most recent time instant is needed to be stored due to the recursive nature of
their calculation. We refer to this simplification as the complete forward algorithm
(CFA). In essence, CFAs memory can be infinitely long.
Although CFA has infinite memory length and can make decisions instantaneously, it does not fully exploit the memory inherent in the underlying Markov
process and its performance may be worse than the weighted forward-backward
algorithm. We can, however, increase performance by propagating backward a few
symbols to better exploit the memory in the data at the cost of increased sensing
delay. We call this algorithm the complete forward partial backward algorithm
(CFPB). Clearly the performance of CFPB lies somewhere between that of CFA
38
forward
decision
backward
decision
decision
decision
decision
A sensing window
(a) Forward-backward algorithm based on sensing window
forward
decision
(b) Complete forward algorithm (CFA)
forward
decision
backward
and the complete forward-backward algorithm with an infinitely long sensing window, giving a tradeoff between sensing performance and sensing delay/complexity.
Figure 3.5 illustrates the difference between CFA, CFPB and the general forwardbackward algorithm based upon sensing window.
39
energy detection and coherent detection and discuss their threshold selection to
the problem of minimizing the detection risk given the cost factors. This is done
by relating their thresholds to that of the proposed weighted forward-backward
algorithm in an extreme case. In the second part, we then introduce the new
fundamental limitation which we call the risk floor.
We start our discussion from the extreme case in which there is no state change
within one sensing window. This condition corresponds to a scenario in which
the transition probabilities p01 = p10 = 0. Therefore, t (i)t (i) in the weighted
sequence detection algorithm simplifies to:
t (0)t (0) = 0
t (1)t (1) = 1
T
Y
fY |S (y |0) = 0 fY |S (y|0)
(3.28)
fY |S (y |1) = 1 fY |S (y|1),
(3.29)
=1
T
Y
=1
where fY |S (y|0) and fY |S (y|1) are joint probability density functions of the whole
received signal Y = (Y1 , Y2 , , YT ) in a sensing window given the PU state is OFF
and ON, respectively. The result is independent of time index t. Therefore, the
comparison between the two risks Rt (0) and Rt (1) is equivalent to the following
decision rule
0
(3.30)
(3.31)
where s = [1 (C01 C11 )]/[0 (C10 C00 )]. The result corresponds to the classical
40
likelihood ratio test for minimizing the risk function [18]. Let A be the ONdecision region for a detector. An ON-decision region is a subset of all possible
outcomes y in which the detection algorithm declares channel to be in ON state.
In general, the false alarm and detection probabilities for a given detector are
Z
Pf =
fY |S (y|0)dy,
(3.32)
fY |S (y|1)dy,
(3.33)
Z
Pd =
A
respectively. We use the term decision region exclusively for the case in which
there is no state change in a sensing window for the weighted forward-backward
algorithm, since only in this case will the detector make the same decision for
every symbol in the block, i.e., it is a block decision rather than a sequence of
individual decisions. For energy detection and coherent detection which make a
single decision for each block, the term decision region always makes sense. The
ON-decision region AS for the weighted sequence detection algorithm is obvious
from Equation (3.31).
41
AE = y
|yt | > e (Pf ) .
T t=1
(3.34)
yt2
2
20
yt2
2
21
QT
QT
fY |S (y|0)
fY |S (yt |0)
= Qt=1
=
T
fY |S (y|1)
QT
f
(y
|1)
t
Y
|S
t=1
t=1
212
(3.35)
fY |S (y|1)
0
1
1
2
2
20 21
X
T
yt2 ,
(3.36)
t=1
and the ON-decision region for the weighted forward-backward algorithm can be
simplified to
X
2 2
1 T
2
1
1
0
1
2
|yt | > 2
ln
ln s (Pf ) ,
AS = y
T t=1
1 02
0 T
(3.37)
e (Pf ) = 2
1 02
1
1
ln
ln s (Pf ) .
0 T
(3.38)
42
detection and weighted forward-backward algorithm are the same under the concerned condition, the importance of these equations goes beyond this. Since
s = [1 (C01 C11 )]/[0 (C10 C00 )], Equation (3.38) essentially relates the threshold for energy detection to the cost factors for missed detections and false alarms
and results in an optimal threshold in the sense of minimizing the detection risk.
Compared to the often-used Gaussian approximation according to central limit
P
theorem for Tt=1 |yt |2 /T [5], here we provide an accurate computation for the
optimal threshold for energy detection that minimizes the expected cost. As standard energy detection does not consider the PUs channel access pattern, it always
uses the threshold derived above to minimize the detection risk given the received
signal power, noise power and cost factors.
It is also worth noting that the proposed sequence detection algorithms we
derived in Section 3.2 depend on accurate knowledge of the distribution of the
observed symbols given the channel state as well as the channel state transition
probabilities. These parameters are not easily known in practice. However, for
one thing, these parameters can be estimated by the Baum-Welch algorithm [17],
which we will study in our future work. For another, if the conditional pdf cannot
be obtained anyway, we can integrate energy detection and the sequence detection
algorithms by dividing the whole sensing window into a sequence of sub-windows
and applying Gaussian approximation to the test statistics of each sub-window
according to central limit theorem. The test statistics is generated by averaging
the received power in each sub-window and is exactly the same as the test statistics
for energy detection. But we are not really implementing energy detection on a
sub-window basis since no final decision is made for each sub-window. We just
want to collect the raw test statistics without comaring it to any threshold. In
43
this way, we cannot only implement the proposed sequence detection algorithms
with insufficient statistics, but also reduce the computational complexity. The
expense of this integration of energy detection and sequence detection algorithms
is an increasing granularity and possible sensing delay.
Another scenario can arise if the PUs spare a certain amount of energy to
transmit pilot signals. For simplicity, we assume the PU always transmits 1 with
normalized signal power when it is occupying the channel. Therefore, in a similar
way, the threshold for coherent detection c can be shown to relate to that of the
sequence detection by
c (Pf ) =
1 w2
+
ln s (Pf ).
2
T
(3.39)
44
detection risk for the given four cost factors is applied for energy detection, then
1
P
|X + W |2 > e
T
1, as SNR ,
(3.40)
where is any time instant within a sensing window. Without loss of generality,
let 02 = w2 = 1. Define SNR=10 log10 (x2 /n2 ) = 20 log10 x . For high SNR,
1 1 (C01 C11 )
ln 10
2s
e = 2 ln x ln
=
SNR
.
T 0 (C10 C01 )
10
T
(3.41)
Therefore,
1
P
|X + W |2 > e
T
1
2
P
|X | > e
T
p
= 2P (X > e T )
s ln 10
T SNR 2s
10
= 2Q
SNR
10 10
1
(3.42)
(3.43)
PU Active / Channel ON
Sensing Window
(a)
Sensing Window
(b)
Figure 3.6. Two cases leading to false alarms for energy detection when
the PU state changes during a sensing window.
state by declaring the channel is ON. However, for simplicity, we assume the SU
continuously senses the spectrum without transmitting and the decision is made
for the current block or symbol. Therefore, the ON decision for the whole block
leads to false alarms for the first part of the sensing window in which the channel
is still OFF as shown in the figure.
We will only consider the case in which the window length T min{E[L0 ], E[L1 ]}
since things get even worse when T is comparable to E[L0 ] and E[L1 ] as we
will see in the numerical results. Type I corresponds to the case in which the
channel changes from state ON to OFF in a sensing window. The condition
T min{E[L0 ], E[L1 ]} guarantees that the probability of multiple channel state
46
changes during one sensing window is negligible in computing the channel state
change probability in a sensing window. The symbol risk for type I false alarm is
RI = 1 C01
T
1
Y
t=1
T t
P (L1 = t)
T
1 pT11
1
.
T p10
(3.44)
1 pT00
T 1
p00 .
T p01
(3.45)
= 1 C01
RII = 0 C10
T
1
Y
t=1
t
P (L0 = t)
T
= 0 C10
RF RI + RII .
(3.46)
Intuitively, false alarms are caused primarily by randomness and confusion in the
primary signal and noise for low SNR, and they are dominated by channel state
changes for high SNR. Since the risk floor results from not considering channel
state changes, it can be shown in a similar way that the risk floor arises for coherent
detection as well. Numerical results verifying the existence of this risk floor are
provided in the following chapter.
47
CHAPTER 4
NUMERICAL RESULTS
This chapter provides numerical results demonstrating the improved performance that the new sequence detection algorithms exhibit over energy and coherent detection. For simplicity, we assume the SU continuously senses the spectrum
and never transmits.
48
0.8
0.7
Pd=1Pm
0.6
0.5
0.4
0.3
0.2
0.1
1
1.5
2.5
3
log10(T)
3.5
4.5
overlapping energy detection are very similar. However, if the length of the sensing window is comparable to the average length of an ON/OFF period, the effect
of state changes in a sensing window comes into play and the performance of energy detection is seriously affected since it does not account the PU dwell time.
On the other hand, the performance of the weighted sequence detection algorithm
continues to improve with increasing window length. The performance does not
degrade since the algorithm itself takes possible state change into consideration.
Second, for both overlapping and non-overlapping energy detection, there is an
49
optimal window length T that gives the best detection probability Pd for a fixed
P f , given SNR and the PUs channel access statistics. If the window length exceeds T , the detection performance degrades because the energy detector groups
observations from multiple PU states. Although no theoretical analysis is provided
here, we call this limitation of energy detection (and coherent detection in the next
example) the window length limitation. It is anther limitation for spectrum sensing performance besides the well-known SNR-wall [6]. It implies that not every
desired operating point (Pf , Pm ) is achievable even with the noise power perfectly
known (no SNR wall) since the sensing window cannot be arbitrarily long. More
interestingly, the proposed sequence detection algorithms cannot achieve arbitrarily large detection probability either, even with infinite window length. On the
contrary, the detection probability corresponding to a given false alarm probability approaches a limit as T becomes large as shown in the figure. This implies that
PHY layer detection methods are performance limited by the PUs channel access
pattern. Nevertheless, our proposed sequence detection algorithms outperform
the traditional energy detection in a number of ways. Moreover, we also notice
an advantage of the non-overlapping rule over the overlapping rule with regards
to operating pairs.
Now we consider an example of coherent detection. If the primary signal is
known to the secondary user and coherent detection is used, the sensing window
can be much shorter than that of energy detection to achieve the same operating
pair. Therefore, in order to clearly see the advantage of sequence detection over
coherent detection, we consider a smaller sensing window length and PU dwell
time. The expected OFF and ON dwell times are E[L0 ] = 100 and E[L1 ] = 50, and
SNR is 10 dB. We compare the performance by plotting the ROC curves for three
50
window lengths as shown in Figure 4.2. As the results show, weighted forwardbackward and coherent detection have similar ROC curves when T is relatively
small. As T increases, the ROC curves of coherent detection begin to fall below
that of the weighted forward-backward. The ROC curves for coherent detection
even begin to degrade after a certain T , while on the other hand, the ROC curves
of sequence detection continues to improve with increasing T . However, the curves
converge as T goes to infinity and no further significant improvement can be made.
These results agree with the conclusions made from Figure 4.1.
51
1
0.9
0.8
Pd=1Pm
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
Pf
Risk
10
10
CFA
CFPB (lB=10)
CFPB (lB=50)
CFPB (lB=100)
2
10
10
Energy Detection(T=100)
8
4
SNR (dB)
Figure 4.3. Performance for CFA and CFPB. E[L0 ] = 200, E[L1 ] = 100,
C01 = 10, C10 = 1.
symbol error small. Moreover, the weighted forward-backward algorithm significantly outperforms sequence-MAP and symbol-MAP which do not differentiate
missed detections and false alarms. We observe a gain analogous to that of coding gain for the weighted forward-backward algorithm, which is about 1 dB when
the risk is 102 and 6 dB when the risk is 103 for T = 10, and 2 dB when the
risk is 102 and about 10 dB when the risk is 103 for T = 100. We also observe
that the performance of sequence-MAP and symbol-MAP are extremely bad at
low SNR, even worse than that of energy detection.
Another important observation from these simulation results is the validation
53
10
Risk
10
10
CFA
CFPB, lB=1
CFPB, lB=4
CFPB, lB=10
3
10
10
CFPB, lB=100
5
10
15
SNR (dB)
20
25
30
Figure 4.4. Performance for CFA and CFPB. E[L0 ] = 200, E[L1 ] = 100,
C01 = 10, C10 = 1.
of the existence of the risk floor for energy detection. We notice that the risks
for the weighted forward-backward algorithm decrease with asymptotically fixed
slopes as SNR increases, however, for energy detection the risk approaches the
risk floor and cannot be decreased, regardless of the window length. The risk
floor shown in the simulation results also validates the theoretical analysis in
(3.46). For T = 10, RF = 0.003 by Equation (3.46), and the simulation result
in Figure 4.5 gives RF = 0.003 as well. For T = 100, RF = 0.032 by Equation
54
(3.46), which is very close to RF = 0.031 given by simulation results in Figure 4.6.
Therefore, (3.46) appears to be a good theoretical approximation for computing
the risk floor of energy detection.
10
Energy Detection
SequenceMAP
SymbolMAP
Weighted ForwardBackward
10
Risk
10
10
10
10
10
15
20
25
SNR (dB)
30
35
40
Figure 4.5. The risk floor for energy detection. E[L0 ] = 2000,
E[L1 ] = 1000, T = 10, C01 = 10, C10 = 1.
55
10
10
Risk
10
10
10
10
10
Energy Detection
SequenceMAP
SymbolMAP
Weighted ForwardBackward
5
5
SNR
10
15
20
Figure 4.6. The risk floor for energy detection. E[L0 ] = 2000,
E[L1 ] = 1000, T = 100, C01 = 10, C10 = 1.
56
CHAPTER 5
IMPLEMENTATION OF ENERGY DETECTION AND SEQUENCE
DETECTION ALGORITHMS
mt+1 =
at+1 + t mt
,
t+1
(5.1)
where at is the current data in the streaming data sequence and m0 can be initialized to 0. The estimated parameters are then used in generating threshold for
the energy detector and the revised sequence detector. There are several reasons
why cumulative moving average is used. First, it minimizes the memory size since
only the most recent data needs to be stored. Second, compared to storing all of
58
the data and calculating the sum and dividing by the number of data points, the
cumulative moving average method averages the computation into each sensing
period and avoid the massive computation in one period, which, with high probability (almost for sure in practice), will incur the USRP overrun (will be discussed
in more details in Section 5.6.1.2).
In order to estimate the missed detection probability and the false alarm probability, we need to record the activity of the PU and the sensing result of the SU
and synchronize their starting point. We then use separate Matlab functions
to estimate these probabilities. Note that we use the term estimate instead of
compute because, for one thing, the perfect synchronization point is hard to find,
and for another, sampling rate offset discussed in more detail in Section 5.6.1.3)
between the PU and the SU exist, which will make the records of the PU and the
SU shifted by some unknown factor from time to time.
B=
1+
R = 67.5 KHz.
2
59
(5.2)
The format for each packet is shown in Figure 5.1. Note that though no
primary reception is considered, we still use the standard packet format defined in
GNU Radio. The preamble contains the training sequence for channel estimation.
An access code is used to identify the beginning of the payload. The header
contains payload length information. CRC is Cyclic Redundancy Check and the
last padding byte is added by USRP. Payload is the user-defined data and its
length must be between 0 and 4,096 bytes. The number of samples in each packet
is calculate in the following way:
Preamble
2 Bytes
Access Code
8 Bytes
(5.3)
bit per symbol
Bytes
Payload
0 4096Bytes
Header
4 Bytes
CRC
4 Bytes
Pad
1 Bytes
Other parameters related to the primary transmission are defined in Table 5.1.
60
mission is the smallest possible time period that the primary transmitter can
occupy the channel. Each busy period (ON state) must be multiple of a packet.
For simplicity, we assume an idle period (OFF state) to be multiple of a packet as
well. At the beginning of the transmission, the PU periodically transmits fixedlength pilot signals with ns pilot tx samples, with quiet periods of equal length in
between, as shown in Figure 5.2. We call a complete transmission of an ON pilot
sequence followed by an OFF pilot sequence one period of pilot sequence.
Mixed state
All ON state
Mixed state
Sensing window
Sensing window
Sensing window
Sensing window
61
the hardware point of view, the time for the USRP to switch from transmitting
to silent (and vice versa) is significant and may be much longer than the time
to transmit a packet.
After the pilots transmission, the PU begins to access the channel in a Markov
chain modeled way, as shown in Figure 5.3. Specifically, the number of packets
in an ON state and an OFF state follow geometric distributions with parameters
p10 and p01 , respectively. The entire transmission structure of the PU is shown in
Figure 5.3.
62
TABLE 5.1
Implementation parameters for wireless system
Variable name
Value
s payload
1980
s redundancy
Definition
20
ns pilot tx
160000
ns pilot rx
160000
ns packet tx
32000
ns packet rx
32000
ns win
32000
n packet in pilot
n pilot repeat
how many times the ON-OFF pilot sequence repeats before the Markov transmission
n E ON
10
n E OFF
10
interp
128
decim
64
63
the received SNR based on the PUs pilot signals. In order to do so, it should
first detect the starting point of the pilot transmission. The software engine of
the SU also needs to be robust enough to differentiate any bursty variation in
noise (background) from the real pilot transmission to avoid a false declaration.
Therefore, the software engine of the SU is implemented in three states (modes):
PROBING.
TRACKING.
SENSING.
A flow graph showing how the software engine of the SU works in our experimental framework is illustrated in Figure 5.4. We will discuss the functionalities
of each state in detail in the following parts of this section.
64
65
Prepare for tracking:
set state to TRACKING,
begin estimating signal
power and synchronizing
point
Yes
Correlation exceeds
certain threshold?
Yes
After
tracking enough
time, number of matched
patterns exceeds
threshold?
In TRACKING state:
store data,
compute correlation,
count matched patterns
TRACKING
Sensing result
In SENSING state:
send data to
sensing engine
No
SENSING
No
In PROBING state:
store data,
compute correlation
PROBING
SU state
is coincidentally synchronized with the PU. In this case, the samples in the four
consecutive windows should be from: all-ON-state, all-ON-state, all-OFF-state,
all-OFF-state. It still fits the pattern of alternating between all-ON-state and
all-OFF-state for every other window. Therefore, we only make discussion based
on the general case in which mixed-state windows exists with the realization that
the results apply to the special case as well.
Let Yt be the SUs received sample at time t. Let Zn be the n-th output of the
half-pilot-size power estimator. Zn can be computed by
Zn =
1
L
nL
X
|Yt |2 ,
(5.4)
t=(n1)L+1
ns pilot tx
128M
interp
(5.5)
which leads to
ns pilot rx =
ns pilot tx interp
.
2
decim
(5.6)
2
Let z,n and z,n
be the estimation of the mean and the variance of Zn , re-
spectively. Note that z,n is also the estimation of the noise power w2 if there
2
is no primary transmission. By cumulative moving average, z,n and z,n
can be
67
updated iteratively by
(n 1)z,n1 + Zn
n
2
(n 1)z,n1 + (Zn n )2
=
n
z,n =
(5.7)
2
z,n
(5.8)
The correlator shown in Figure 5.5 is the key element in both the PROBING
and the TRACKING modes. If the SNR is very low, it is impossible to mark the
starting point of the primary transmission from the power level only, especially
when the signal and noise power levels are not known a priori.
Mixed
All ON
Correlator
Mixed
All OFF
Mixed
All ON
+1
Mixed
In the following we briefly discuss how the correlator works in finding the
starting point as well as tracking the PU in pilot transmission. Let Rn be the
68
Rn = Zn Zn2 .
(5.9)
E[R] = 0,
(5.10)
Var[R] = 2z2 .
(5.11)
After the PU starts to transmit the pilot signal, suppose Zk is the output of the
first all-ON-state window. In this case, Zk2 must be the output of an all-OFFstate window as discussed before. For consistency, let x2 be the power of the
received signal from the PU. Therefore,
(5.12)
Hence, if Rn exceeds a certain level, the SU can declare the start of the pilot
2
be the estimation of mean and variance of R at
transmission. Let r,n and r,n
2
the n-th window, respectively. r,n and r,n
can be computed in the same way as
Rn > r,n2 .
(5.13)
where is a tunable, which is set to be 10 initially and will increase by one every
time a false declaration is made.
The reason to use r,n2 instead of r,n or r,n1 in Equation (5.13) is obvious
since with high probability a mixed-state window will be included in computing
69
70
Tracking
from here
Declaring
PU start
Pattern I: Declaring from a mixed-state-sample window
All On Samples Mixed Samples All OFF Samples Mixed Samples All On Samples Mixed Samples All OFF SamplesAll OFF Samples
Tracking
from here
Declaring
PU start
Similar to estimation of the noise power, the power level of the ON state is
estimated by the cumulative moving average of the outputs of all the all-ON-state
windows. The synchronization point is estimated by the two types of mixed-state
windows since along with the estimated power levels of ON state and OFF state,
they provide a rough estimation of how many samples are mixed from each state.
71
The SU then skips a suitable number of samples (part of the SUs last pilot period)
and start real spectrum sensing (SENSING mode) afterwards.
It can be deduced from the above discussion that the first period of pilot
sequence serves to mark the starting point of the primary transmission, the following n pilot repeat 2 periods of pilot sequence are utilized to finally confirm
the presence of the PU as well as to estimate the signal power and synchronization
point, and the last period of pilot sequence is simply ignored so that the SU can
synchronize with the PU.
The combination of the half-pilot-size power estimator (energy detector) and
the correlator provides a robust way of finding the starting point of the primary
transmission as well as estimating the received SNR. It works reasonably well even
for SNR as low as -20 dB when the related parameters are set as in Table 5.1.
72
73
0.7
0.65
0.6
Risk
0.55
0.5
0.45
0.4
0.35
0
10
15
Window length (in packets)
20
Figure 5.7. Risk level for energy detectors with different sensing window
length.
74
tection algorithms, are very hard or even impossible to estimate. To see this,
Figure 5.9 and Figure 5.10 illustrate the power level of an OFF and an ON period, respectively, in a wireless environment, respectively. We can see from these
figures that neither distribution is perfectly Gaussian. In fact, they are changing in an unknown bursty manner. On the contrary, Figure 5.9 and Figure 5.10
illustrate the power level of an OFF and an ON period in a calibrated wired
environment, respectively. It can be seen from these figures that they are approximately Gaussian and their distributions can be estimated in the TRACKING
mode as discussed above. We use attenuators to reduce the received signal power
in the wired environment in order not to overload the USRP receiver.
75
power level
550
500
450
400
0
500
1000
1500
2000
2500
3000
Sensing windows
300
250
200
150
100
50
0
400
420
440
460
480
500
520
76
540
650
power level
600
550
500
450
0
500
1000
1500
Sensing windows
100
80
60
40
20
0
460
480
500
520
540
560
580
600
620
77
640
12
power level
11.9
11.8
11.7
11.6
11.5
11.4
0
100
200
300
400
500
600
700
800
900
1000
Sensing windows
80
60
40
20
0
11.4
11.5
11.6
11.7
11.8
11.9
78
12
23.6
power level
23.4
23.2
23
22.8
22.6
22.4
0
100
200
300
400
500
600
700
800
900
1000
Sensing windows
100
80
60
40
20
0
22.4
22.6
22.8
23
23.2
23.4
79
23.6
Samples
Sub-windows
Windows
Due to computational limitations, we implemented a complete forward sequence detector as well as a complete forward partial backward sequence detector
based upon a sub-window structure, as shown in Figure 5.13. To elaborate, the
average power in each sub-window (as Zn in Section 5.3.1) is used as the input (as
Yt in Section 3.2) to the sequence detection algorithms and the sensing decision
is made per sub-window. We also use a discrete version of the proposed sequence
detection algorithms for the sake of reducing computation complexity.
Since we change our system setup from wireless to wired, we also change some
of the implementation parameters. The new parameters for implementing the
sequence detection algorithms are defined as in Table ??.
TABLE 5.2
Implementation parameters for the calibrated wired system
Variable name
Value
Definition
80
TABLE 5.2
Continued
Variable name
Value
Definition
ns pilot tx
1600
ns subwin
1600
n packet in pilot
n pilot repeat
how many times the ON-OFF pilot sequence repeats before the Markov transmission
n E ON
10
n E OFF
10
lB
C01
10
C10
81
1.25
Energy Detection
CFA
CFPB (lB=1)
1.2
Risk
1.15
1.1
1.05
0.95
10
7
SNR (dB)
In Figure 5.14, the experimental performance of the CFA and CFPB detectors
are compared with a traditional energy detector that does not take memory into
account. It can be seen that by exploiting the memory in the PUs channel access
pattern, CFA and CFPB outperform the traditional energy detection algorithm.
The experimental results also confirm the fact that CFPB does better than the
CFA. However, due to certain limitations to be discussed below, we can only
implement the CFPB with the backward length to be only one sub-window.
82
83
84
PU
SU
(expected)
Mixed
All ON
Mixed
All OFF
All ON
Mixed
All OFF
Mixed
4n + 1 half-pilot-size windows
Another more harmful sampling offset is caused by the software code, which we
call the software sampling offset (In fact it is not actually sampling offset, but
processing offset). If the SU does too much work in one period, the time to
run these codes accounts and the host PC starts to lag behind the USRP. This
will eventually cause an USRP overrun after a certain amount of time. However,
it may take much longer time to observe an USRP overrun than to transmit the
entire pilot signal, which makes the SU unaware of this sampling offset. Sampling
offset will affect the tracking process of the SU fundamentally since the expected
pattern of all-ON-state window mixed-state window all-OFF-state window
mixed-state window in the pilot signal will be violated as shown in Figure 5.15.
Even if the mismatches are within the tolerance level, the estimation of the power
level of an ON state may be incorrect since the estimation is made by averaging
across different types of windows. Therefore, the sampling offset imposes an upper
limit on the transmission time of the PUs pilot signal for the SU to track. The
sampling offset also has great impact on the estimation of probabilities of false
alarm and missed detection.
Though it cannot be precisely determined, the sampling frequency offset can
85
86
87
CHAPTER 6
CONCLUSIONS AND FUTURE WORK
Dynamic spectrum access, and cognitive radio more generally, are promising
solutions to the spectral crowding problem that introduces the opportunistic usage
of frequency bands that are not efficiently utilized by licensed users. Spectrum
sensing is the key functionality to enable dynamic spectrum access. Traditional
PHY layer sensing schemes such as energy detection do not consider the primary
users channel access pattern. In this work, we propose several new PHY layer
spectrum sensing schemes that exploit Markov memory of the primary users access pattern. These new schemes take a sequence detection structure and therefore
are called sequence detection algorithms for spectrum sensing. Our algorithms are
based on the Viterbi algorithm and the forward-backward algorithm, which are
well-known in the channel coding literature. The latter algorithms allow different cost factors to be assigned to different types of detection errors, i.e., missed
detections and false alarms.
Two advanced sequence detection algorithms for spectrum sensing are proposed in this work. The complete forward algorithm (CFA) makes the decision
only for the current time instant, based only on the forward probabilities. The
complete forward partial backward algorithm (CFPB) provides a tradeoff between
sensing performance and sensing delay and computation complexity by computing
a few backward probabilities.
88
89
robust sequence detection algorithm given all the constraints from hardware and
software. Another direction is to expand the cognitive system and let the secondary user really transmit after detecting a spectrum hole. This corresponds to
a real dynamic spectrum access system in which primary and secondary receivers
exist.
90
BIBLIOGRAPHY
92
93
This document was prepared & typeset with pdfLATEX, and formatted with
nddiss2 classfile (v3.0[2005/07/27]) provided by Sameer Vijay.
94