• No results found

A Signal Detector for Cognitive Radio System

N/A
N/A
Protected

Academic year: 2021

Share "A Signal Detector for Cognitive Radio System"

Copied!
72
0
0

Loading.... (view fulltext now)

Full text

(1)

A Signal Detector for Cognitive Radio System

Aldo Buccardo

June 11, 2010

Master Program in Telecommunications Engineering

(2)
(3)

Table of Contents

Chapter 1 Introduction...5

1.1Overview...5

1.2Motivation...7

1.3Purpose...9

1.4Outline...9

Chapter 2 Cognitive Radio Technology...11

2.1CR Approach...11

2.2CR Architecture...12

2.2.1CR functional components...12

2.2.2Learning: The Cognition Cycle...14

2.2.3SDR: Software Defined Radio...15

2.3Spectrum Sensing Cognitive Radio...16

2.4Challenges in spectrum sensing...17

2.5Cognitive Radio Standard: IEEE SCC41...17

Chapter 3 Signal Detector...20

3.1Background...20

3.2Detection methods in literature...22

3.2.1Matched Filter...22

3.2.2Energy detection...23

3.2.3Feature detection...24

3.2.4Eigenvalues detection...24

3.2.5Comparison...25

3.3Detection methods proposed...26

3.3.1Eigenanalysis of the autocovariance matrix...26

3.3.2Maximum­minimum eigenvalues based detection...28

3.3.3The algorithm to find the eigenvalues...29

3.3.4Threshold definition...30

Chapter 4 GNU Radio...34

4.1Introduction to the testbed...34

4.1.1GNU Radio platform...35

4.1.2Wireless open Access Research Platform...35

4.1.3Berkeley Emulation Engine 2...36

4.1.4The choice of GNU Radio...37

4.2GNU Radio Project...37

4.3Detector block...41

4.3.1Detector Code...42

4.3.2XML code...44

Chapter 5 Detection tests...47

5.1Overview...47

5.2Matlab tests...48

5.3Detection test in the real world...50

(4)

Chapter 6 Results analysis...55

6.1Comparison...55

Chapter 7 Conclusions...58

Appendix A: C++ code...60

Appendix B: Matlab code...66

(5)

Chapter 1 

Introduction

1.1 Overview

At present, the radio spectrum support a wide range of business including narrow and broadband mobile telecommunications, medical and scientific research, cultural activities, aeronautical and marine communications, defense and emergency services. Thus communications and radio services are increasingly important to economic and social development and the radio spectrum became an important natural resource. With the appearance of new wireless systems, the demand for radio spectrum is increasing and the scarcity of this resource is becoming obvious. Radio spectrum management to ensure the efficiency of radio communications equipment and services is necessary. Clearly, the regulatory process of ensuring the optimal use of the spectrum needs to be flexible and responsive in order to adapt to changes in technologies, demand, markets and public policy. Efficiencies may to be limited for safeguarding the provision of public services such as safety, defense and public broadcasting, or it can to be compromised by old

(6)

Introduction

commercial and government policies. Actually every wireless system got its own license to avoid interference and for new technologies is difficult to operate in their spectra because these are already occupied from commercial operators and government.

To address the scarcity of radio spectrum, the Federal Communications Commission (FCC) published a report[1], prepared by Spectrum Policy Task Force (SPTF)1, where you can read that some bands are crowded while others are fewer used. For example Figure 1 shows the spectrum occupancy in Dublin in 2007 measured by Shared Spectrum Company[2]. Dublin is the most densely populated city in Ireland and it is shown that the spectrum occupancy during a high usage period in a normal work week is only 13.6% in

1: The Spectrum Policy Task Force is a Team of high-level, multi-disciplinary professional FCC staff for identifying and evaluating changes in spectrum policy that will increase the public benefits derived from the use of radio spectrum.

Figure 1: Measured Spectrum Occupancy in Dublin, Ireland

(7)

mean. To ensure the efficient management of radio spectrum new policies and technologies are necessary. For example, an actual measure turns off the analog television broadcasting and switches digital television system. In any case, it's difficult to reclaim and release spectrum bands already licensed, so a new dynamic policy of spectrum licensing is employed by FCC and PTS (Swedish Post and Telecom Agency). They define two types of licensed user:

Primary User (PU) and Secondary User (SU). To decrease the unused spectrum the PU could share spectrum with a SU under special negotiable conditions without releasing his own license. This project needs an intelligent radio system to manage the shared spectrum, sense spectrum used by neighboring devices, change frequency, adjust output power, and even alter transmission parameters. According to the SPTF, Cognitive Radio (CR) is one way to improve the efficiency of the radio spectrum utilization[3].

Actually, CR finds unused spectrum to insert a SU transmission without interfering with PU. Thus this technology can solve the problem of the unused spectrum, but it can be used in many others applications: emergency communications services, broadband wireless networking, multimedia wireless networking, and more. In these cases, the Cognitive Radio system can make decisions about its own behaviors and operations according to its working environment to improve the quality of service. CR is a very important technology for the new generations digital communications and its development is fundamental to guarantee an optimal use of the radio spectrum as well economical and social benefits.

1.2 Motivation

The Cognitive Radio can automatically analyze its radio spectrum environment to identify temporarily vacant spectrum and use it. Moreover, CR is a flexible system because it can change the communications parameters to adapt to channel conditions. Automatism and flexibility are possible

(8)

Introduction

because CR includes Software-Defined Radio (SDR). The basic concept of the SDR software radio is that the radio can be totally configured or defined by the software so that a cheap and simple hardware (a PC with sound card is sufficiently) can be used in many applications. With SDR many hardware components like mixer, filters, modulators, demodulators, are implemented via software. Thus, simply modifying the software, CR can completely change its functionality, or improve its performances, without replace hardware[4].

This characteristic allows to add new features to CR and improve its existing ability. In particular, it's important to study and develop a signal detector for CR that new methods and algorithms can make fast and accurate. Indeed the detection ability is a key functionality for CR, but the signal detector can be used in other projects of spectrum sensing where to identify the presence of a signal is request. An interesting device is the signal classifier[5] that determines the modulation scheme of an input signal, corrupted by noise and interferences, without requiring any knowledge about it. In this application, the detector finds a signal in the spectrum and routes it to the classifier. At present this new instrument is included in a Real Time Spectrum Analyzer[6], However several benefits, such as faster execution time and extensibility to meet new requirements, are given by SDR[7]. Thus, it's possible include a signal classifier module in CR to obtain a better spectrum management and to know which kind of signal is present in a given band and in a given time, but however a signal detector is necessary.

Most research currently focuses on spectrum sensing in CR, but theoretical detection algorithms are not enough. A hardware test platform is required to test and check the performances of the CR networks. An interesting testbed platform for radio network has been introduced by Eric Blossom: GNU Radio. It's a free software (open source) toolkit for building software radio[8]

that respects the SDR principles. Moreover GNU Radio is designed to work with an inexpensive hardware device called USRP2 (Universal Software Radio Peripheral) that includes acquisition board and RF interfaces. Thus,

(9)

GNU Radio is a perfect platform for testing the signal detector in real transmission conditions, but to implement a signal detector module is also an opportunity to contribute at GNU Radio improvement.

1.3 Purpose

Spectrum sensing plays a main role in CR because it's important to avoid interference with PU and guarantee a good quality of service of the PU. In adding a detection device is useful for signal classifier that improves CR ability. The project of a signal detector has been developed from University of Sannio (Benevento, Italy) in collaboration with University of Gavle. In the Laboratory of Signal Processing and Measurement Information (LESIM) [9], the device has been implemented by means a PC, an high quality signal generator and antennas [10]. In this work, the detection will be checked making the wireless link between two devices of lower quality. In this way, the detection is nearest to the real world. Thus a GNU Radio platform including a signal detector prototype is presented. The detection method is eigenvalue based [11]. The SVD algorithm is used (Singular Value Decomposition) to estimate the eigenvalues of the correlation matrix.

Exploiting the relationship between University of Gavle and Ericsson to realize a CR system, the detector prototype has been made and tested in company laboratories. To support the detection method and the implementation choices this thesis reports experimental results and explanatory conclusions.

1.4 Outline

This master's thesis consist of seven chapters and begins with an overview of the spectrum management. Moreover objectives and motivations of this work have been presented like possible solution of the limited spectrum problem.

(10)

Introduction

The second chapter describes Cognitive Radio and it studies in deep the Spectrum Sensing function, SDR capability and IEEE standard. In the Chapter 3 the detection method eigenvalues based improved with SVD algorithm is presented. Chapter 4 describes the instruments and the architecture of GNU Radio system that allow to realize the signal detector.

Chapter 5 reports the detection test results made with simulated and emulated signals. Comments of results and final conclusions are finally insert in the sixth and seventh chapter respectively.

(11)

Chapter 2 

Cognitive Radio Technology

2.1 CR Approach

In August 1999, Joseph Mitola officially introduced the cognitive radio paradigm[12], which has a built-in programmable and optimized new wireless system. Mitola, in his dissertation[13], described this innovative approach in wireless system as: the point at which wireless personal digital assistants (PDA) and the related networks are sufficiently computationally intelligent about radio resources and related computer-to-computer communications to detect user communications needs as a function of use context, and to provide radio resources and wireless services most appropriate to those needs.

In summary, a full CR, called Mitola Radio, is a fully re-configurable radio device that can cognitively adapt itself to both user's needs and its local“ ” environment. CR has a great potential to provide more benefits to telecommunications systems. It's predicted that CR identifies portions of unused spectrum to transmits in it to avoid interferences with others users.

Moreover, CR has a lot of capabilities that can improve the spectrum access

(12)

Cognitive Radio Technology

and communications services. CR could incorporate some spectrum control module to check and select the appropriate operating frequency ranges in function of the country in which they are used. This ability could be improved incorporating in CR the signal classifier proposed in [6]. CR could facilitate interoperability between different devices in which carrier frequency and/or transmission systems are different. For example, CR can work like a bridge between two systems receiving a signal in one format and transmitting the same information in different mode. Using the Dynamic Frequency Selection (DFS), CR improves the spectrum management changing dynamically the operating frequency. An important CR feature is the Transmitter Power Control (TPC) which allows transmission at the allowable limits when necessary. For safety reasons a TPC installed in a mobile device could decrease the power when it is in airport. These are few examples of CR potential applications, actually there are many possibility.

2.2 CR Architecture

This section summarizes of the ideal Cognitive Radio Architecture (CRA) that is more developed in [12][14]. The fundamentals design rules by which sensors, Autonomous Machine Learning (AML) and SDR may be integrated to create aware, adaptive and cognitive radio are presented.

2.2.1 CR functional components

A simple description of CRA is the set of six functional components showed in Figure 2.

(13)

A specific hardware to implement these function is necessary, but CR is a emergent technology so the boxes can be considered functional, not physical.

These functional components are[14]:

1. the User Sensory Perception (User SP) interface includes audio and video sensing and perception (observation) function;

2. the local environment sensors (location, temperature, accelerometer, compass, etc.);

3. the system applications (media independent services like playing a network game);

4. the SDR functions (which include RF sensing and SDR radio applications);

5. the cognition functions (symbol grounding for system control, planning, learning);

6. the local effector functions (speech synthesis, text, graphics, and multimedia displays) .

Each block is independent, but relationships between them exist so they cooperate together. The user interface consist of buttons, microphones and video devices; it encodes and interprets user and environment's inputs to have high performances in transmission. In adding, local sensors check the environment situation to perform an efficient access to wireless network.

User's data and others informations are elaborated by system applications component to guarantee continuity, integrity and coherence of multimedia

Figure 2: Functional Cognitive Radio Architecture (CRA)

(14)

Cognitive Radio Technology

streams. Different information systems can interoperate because they are managed by the cognition functions. Obviously the first afferent of system applications is SDR to transmit the multimedia information on wired or wireless channel. SDR behavior depends of environment conditions. The cognitive system may select the optimal parameters configuration processing the environment informations. In general, the cognitive system is the main block for CRA; it has the full control on the blocks interfaces via sensory perception and AML technologies. Finally, the local effectors synthesize speech along with traditional text, graphics, and multimedia displays .

2.2.2 Learning: The Cognition Cycle

The structure in Figure 2 and the functional components do not deepen the intelligent aspect of CR. In a ideal CRA a machine learning is integrated to provide the fundamental capabilities required for CR: to observe (sense, perceive), orient, plan, decide, act, and learn. The rules, by which these capabilities are related, are included in a reactive sequence, illustrated in Figure 3, called cognitive cycle[13][14].

Figure 3: The cognitive cycle

(15)

Through User Interface and Environment Sensors, the CR system continually observes (senses and perceives) own environment. External stimuli are elaborated in the Orient phase to determine their meanings and their priority. The system is trained to respond to a stimuli, like particular RF conditions, signals, and more, with a immediate reaction or a planned activity. Typically, the reactions and CR behaviors are defined by a network or planned with specifics tools (Cognitive Functions). Typical actions are to save data or to search a new RF channel. In any case, the actions are not always unique. It's possible that the current stimulus is common to more plans so the system should decide. The choice depends by CR experience and user's application, but, in critical situations, to alert the user is possible. The perception, observation, decision and action functions cause the CR learning:

the system counts the occurrences of the events (it makes a statistic) and remembers its past decisions based on the external stimuli and user's preferences. The learning also occurs when new decision models and planning tools are embedded in CR system.

2.2.3 SDR: Software Defined Radio

The ideal Cognitive Radio is a system in which Analog to Digital Converter (ADC) and Digital to Analog Converter (DAC) convert signals to and from RF and the modulator, demodulator, mixers, filters and other electronic devices are replaced by software. SDR transforms the analog world in a digital world so that the radio system may be processed by computer. This means that all modulation schemes are handled digitally with performances difficult, or impossible, to obtain in analog circuits. This digital radio allows great flexibility so that it can adapt itself to the environment. In this case, SDR has a RF front-end able to access more that 2.5 GHz for supporting all kinds telecommunications services in television band, GSM band, air traffic control band, and more. For RF frequencies, ADCs and DACs consume many

(16)

Cognitive Radio Technology

electric power so CR needs a SDR that conserves the life battery for the portable devices. SDR flexibility is possible if the hardware architecture can change its internal software: FPGAs and DSPs can be used, but the ideal SDR needs infinite memory for learning, so that the hardware complexity grows inevitably. At present, the ideal SDR is not be practical and affordable so a real CR prototype is far.

2.3 Spectrum Sensing Cognitive Radio

The definition of Full CR implies Intelligent Signal Processing (ISP) at all layers of the OSI model and, at the moment, this is not possible. There are two principals problems: to design a hardware with the ability to intelligently make decisions based on own local environment; to develop SDR technologies to enable full reconfigurability. Because the cognitive science is in its infancy, these problems may not be solved for many years. For example, a device capable of operating in any frequency band up to 3GHz without the need for rigid front-end hardware (excluding the antenna) will not be available before 2030[15]. Anyway, true cognition and fully flexible radio technologies may not be needed: a simpler intelligence at the physical layer coupled with lower degrees of ISP, could provide significant benefits over traditional types of radio. This CR is classified spectrum sensing cognitive radio[16] because its main function is spectrum sensing. In other words, CR focus its functions to increase the spectrum efficiency in specific bands. At present some elements of CR are used in the current radio systems: Adaptive Frequency Hopping (AFH) is included in the Bluetooth standard to avoid interference with other wireless technologies in the 2.4GHz unlicensed radio spectrum[17].

(17)

2.4 Challenges in spectrum sensing

To realize a spectrum sensing cognitive radio, as well as bring benefits at old radio systems, is a fundamental step to make a full CR so spectrum sensing function is an important objective for research world. Spectrum Sensing is not a easy problem to solve. Actually, it can be formulated as a class of optimization problems that arise in CR networks to maximize the spectrum efficiency. A sensing algorithm design should optimize the implementation complexity, the interference measurement, the power absorption, and more.

Anyway, it must also tackle others specific problems of the communications systems. Multipath fading would normally be expected to interfere with the signals between the target under detection and CR, so it's difficult to understand if a signal doesn't exist or it's reduced by a bad channel. This problem is called hidden PU“ ”[18][19] because a SU could transmit in a apparent hole of spectrum that on contrary hides a PU signal. Other important feature of CR is the sensing time that may be as fast as possible.

Hence, the detection method should be able to recognize the PU within a definite time. Finally, we can not forget that CR network consists of multiple SU and PU, thus interferences between SU can occur so that detection system becomes unreliable. Cooperative sensing is recommended in literature for solving these problems[18][19], but definitive solutions don't exist yet.

Actually CR is an open yard so, to uniform the building of CR, a coordinated work is necessary, so the most important challenge is to make a CR standard.

2.5 Cognitive Radio Standard: IEEE SCC41

A lot of companies and research groups in numerous university are focusing their efforts on CR. Since many technical and economical aspects are associated with CR, there is a need standardize the processes, terms and so on. To address the issues about the development of new generation Radio system, IEEE has created the Standards Coordinating Committee 41 (IEEE

(18)

Cognitive Radio Technology

SCC41) [20] to develop standards related to dynamic spectrum access networks. IEEE SCC41 is divided in six work groups each responsible for evolve the standardization of a particular aspect of CR. They are called IEEE 1900.x where .x is working group number[20]:

1. Standard definitions and concepts for spectrum management and advanced radio system technologies. The working group number one is responsible to produce a standard that provides technically precise definitions and explanations of key concepts in the fields of spectrum management, policy defined radio, adaptive radio, software defined radio, and related technologies

2. Recommended practice for interference and coexistence analysis. In a world where the spectrum is shared, the accurate frequency measurements become a crucial requirement. To measure the interference between radio systems operating in the same frequency band, the working group number two to recommend the interference analysis criteria.

3. Recommended practice for conformance evaluation of Software Defined Radio software modules. Because SRD is very important component for future radio systems, a set of test methods for conformance evaluation of SDR software is necessary. The third working group will realize a standard with procedures and recommendations to provide guidance for validity analysis of proposed SDR software.

4. Architectural building blocks enabling network-device distributed decision making for optimized radio resource usage in heterogeneous wireless access networks. IEEE 1900.4 was published on February 27th, 2009. It gives the methods to improve overall capacity and quality of service of wireless systems in a multiple radio access technologies environment, by defining an appropriate system architecture and protocols which will facilitate the optimization of

(19)

radio resource usage. At present, the fourth working group works on two projects: 1900.4a and 1900.4.1. The first facilitates cost-effective and multi-vendor production of wireless access system, including cognitive base stations and terminals . The second provides detailed description of interfaces and service access points defined in the IEEE 1900.4 standard.

5. Policy language and policy architectures for managing cognitive radio for dynamic spectrum access applications. IEEE 1900.5 will define a set of policy languages, and their relation to policy architectures, to manage the features of cognitive radios for dynamic spectrum access applications.

6. Spectrum sensing interfaces and data structures for dynamic spectrum access and other advanced radio communication systems. Recently proposed advanced radio systems use a proprietary architecture so the interoperability with other similar systems could be difficult. To support the interoperability, this group develops a standard that defines the interfaces and data structures required for exchange of sensing related information. Obviously, the logical interface and supporting data structures used for information exchange are defined abstractly without restricting the sensing technology, client design, or data link between sensor and client.

(20)

Signal Detector

Chapter 3 

Signal Detector

3.1 Background

The objective of new technologies is to grow the capacity and speed of transmission data. For this new transmission systems high performances and important features are required:

• broadband hardware to use different bands and channels at the same time;

• flexible software to elaborate different kinds of signals and modulations.

To satisfy these needs, the idea of a CR was born. This new telecommunications system improves the spectrum efficiency and adapts itself at the transmission conditions. Spectrum sensing became an essential functionality to detect spectral holes and to opportunistically use these frequency bands without causing harmful interference to legacy (primary) users. Moreover. signal classification is very important in a scenario in which several technologies and services can be present at the same time. In this

(21)

case, an effective spectrum monitoring could be achieved by recognizing the signals which occupy the spectrum. Both the CR functionalities, spectrum sensing and signal classifier, need a device able to sense the spectrum and to estimate the signal presence. The Signal Detector does this giving a binary output: it's 0 when a unused frequency band is found; it's 1 when a signal is detected. In Figure 4 is showed how the detector could be used in a real CR system: when a signal is found it activates the classifier; if the analyzed band is free the detector enables the transmission for SU.

The Signal Detector implemented in a generic radio platform is a functional block with a user interface and a system interface (Figure 5). Through the first interface the user has interaction with the detection method so he can set some parameters to change the detection performances; the second interface provides to the detection method the data stream under test, and gives to the user some informations about the transmission conditions.

Figure 4: Signal Detector in CR system

Figure 5: Signal Detector Interfaces

(22)

Signal Detector

The detection result is sent to the system to enable the signal classifier or the SU Transmission. Moreover the detection result is showed to the user for two reasons. He can use the result for others applications; with the environment informations and the detection result, the user can give new instructions to the system to improve the transmission performances. In this way, the user adds new laws for the learning of CR. Anyway, the core of the Signal Detector is the detection method. This algorithm should be flexible accurate and fast in execution, so the objective is to make a good trade-off between computational complexity and knowledge a-priori of the signals under test.

To understand how the method has been chosen, in the next paragraphs, the most common detection methods are presented and compared.

3.2 Detection methods in literature

The detection method should overcome many obstacles that make the detection difficult. These factors are: the typical low signal to noise ratio (SNR) in the transmissions; fading and multi-path in wireless communications; the instable noise level in the channel; the need of a low sensing time, and more. Many detection methods exist, but not all of them are independent from these factors so they can not be efficacious. In this section the most important detection methods are presented and how these are limited by the negative factors is explained.

3.2.1 Matched Filter

The best way to detect signals with maximum SNR is to use a matched filter receiver[21]. Its most important skill is the low execution time, but to know the signal proprieties is needed. This method includes the demodulation of the signal. This means that the receiver should agree with the source, estimate the channel conditions and to know the signal nature. This method is useful for dedicated receivers like in TV transmissions.

(23)

3.2.2 Energy detection

This is a basic and common approach to spectrum sensing since it has low computational and execution complexity [22]. An energy detector sets a threshold according to the noise floor and compares it with the energy of the data stream in input. This detector (Figure 6) only requires minimal information, such as the signal bandwidth and carrier frequency. The input signal selects the interesting bandwidth by a band pass filter, than it is sampled. The digital implementation of this method use the Fast Fourier Transform (FFT), so the absolute value of the samples are squared and integrated over the observation band.

Finally, according to a comparison between the output of the integrator and threshold, the presence or absence of the primary user can be detected. In this architecture, the size of FFT provides the resolution bandwidth and good detection of narrowband signals, but this has to consider a costs: long FFT needs many hardware resources and long sensing time. Moreover the threshold depends of the noise level so it's very difficult to fix it in changing conditions. Finally, the detection doesn't recognize the modulated signals from interference frequencies or high noise.

Figure 6: Energy Detector

(24)

Signal Detector

3.2.3 Feature detection

Most signals have statistical proprieties that vary periodically with time, which are called cyclostationary features. Hence, more accurate detection can be achieved by exploiting the inherent periodicity of the autocorrelation function of the signals. In this case a Spectral Correlation Function is defined:

Sxf = lim

T ∞

t ∞

1

t

−tt T1 XTt , f 

2XT*t , f − 2dt 

where XTf  is the Fourier transform and  is called cycle frequency that means the frequency separation of the correlated spectral components.

Modulated signals have a SCF with specific characteristics so, comparing them with a list of typical features, the detection is possible. Anyway this method needs a great complexity computational and the knowledge of some signal parameters of the signal under test like the carrier frequency[22].

3.2.4 Eigenvalues detection

This is a new detection method presented to research community in September 2007[11]. The core of this method is the ratio of the eigenvalues of the covariance matrix of the received signal. Actually there are two types of detection method eigenvalues based: maximum-minimum eigenvalue detection, which compares the ratio of the maximum eigenvalue and the minimum eigenvalue with a threshold; energy with minimum eigenvalue detection, which compares the ratio of the average energy and the minimum eigenvalue with a threshold[23]. The first method doesn't need a-priori knowledge like the second that needs to know the SNR value. Thus the maximum-minimum approach can overcome the noise uncertainty problem and also retains the advantages of the energy approach. In this way the

(25)

method detects signals with unknown source, unknown channel and unknown noise power. The drawback is its complexity.

3.2.5 Comparison

Each method presented has advantages and disadvantages in signal detection.

These are summarized in Table 1 where several aspects of the methods are compared[22]:

• Execution time. The ideal signal detector should work in real time so that the execution time is the shorter possible.

• Noise rejection. Skill of the method to be immune to the white noise.

• Knowledge a-priori. How much information the method needs to detect the signal. In CR this information should be minimum.

• Computational complexity. Capacity calculation required to detect the signal.

• Interference rejection. Skill of the method to be immune to the disturbs different by white noise.

Execution

time Noise

rejection Knowledge

a-priori Computational

complexity Interference rejection Matched

Filter GOOD MEDIUM HIGH LOW HIGH

Energy

Detection HIGH LOW NONE LOW LOW

Features

Detection LOW HIGH MEDIUM HIGH HIGH

Eigenvalues

Detection MEDIUM HIGH NONE MEDIUM LOW

Table 1: Comparison of methods

In conclusion, the method that offers the most flexibility is the eigenvalues based method. For this reason it is implemented in the core of the signal detector proposed.

(26)

Signal Detector

3.3 Detection methods proposed

In this section the core of the signal detector is presented. The block diagram in Figure 5 can be exploded for a deeper analysis. In Figure 7 the main parts of the method are showed: the sampled signal comes from the System Interface to build the covariance matrix or the Hankel matrix; the eigenvalues of the matrix are calculated with a specific algorithm to make the ratio maximum-minimum; with the user's settings the threshold is defined and the comparison with the eigenvalues ratio detects the signal presence.

The discussion is divided in three subsections to highlight the main parts of the method: why the eigenvalues ratio can be used to detect signals; how to find the eigenvalues with a single source and a single receiver; how to define the threshold.

3.3.1 Eigenanalysis of the autocovariance matrix

To explain the detection algorithm, the eigenanalysis of the autocovariance matrix is necessary. It's assumed that the random process x  nis wide-sense stationary and it is linear combinations of p basic components sin

Figure 7: Detection Method

(27)

x  n=

i=1 p

aisin (1)

Since sequence observed is yn =xn n  where n is a white noise sequence with spectral density 2, the L×L autocovariance matrix for y n  can be expressed as

yy=xx2I (2)

where xx is the autocovariance matrix for the signal x n, 2I is the autocovariance matrix for the noise and L is the length of the covariance.

Note that if L p, xx which is of dimension L×L is not of full rank. Now let us perform an eigen-decomposition of the matrix yy. Let the eigenvalues be ordered in decreasing value with 11⋯L and let the corresponding eigenvectors be denoted as{vi, i=1,, L}. We assume that the eigenvectors are normalized so that viHvj=ij(H denotes the conjugate transpose). In the absence of noise the eigenvalues i, i=1,2 ,, p, are nonzero while

p1=p2=⋯=L=0. Thus, the eigenvectors vi , i=1,2 ,, p span the signal subspace. These vectors are called principal eigenvectors and the corresponding eigenvalues are called principal eigenvalues. In presence of noise the eigen-decomposition separates the eigenvectors in two sets. The set vi , i=1,2 ,, p, which are the principal eigenvectors, span the signal subspace, while the set vi , i= p1, , L, which are orthogonal to the principals eigenvectors, are said to belong to the noise subspace. It follows that the signal x  n is simply linear combinations of the principal eigenvectors. Finally, the variances of the projections of the signal on the principal eigenvectors are equal to the corresponding eigenvalues of the covariance matrix[24]. So the principal eigenvalues are the power factors in the new signal space.

(28)

Signal Detector

3.3.2 Maximum­minimum eigenvalues based detection

The method presented in [11] is more generic and it assumes that there are many receivers and sources. Anyway the signal detector presented in this thesis is designed to work with a only source and a only receiver. In this way the method is easier.

The detection problem can be formulated with two hypothesizes: no signal and only noise; signal with additive white noise. The binary hypothesis test can be replaced by:

H0: x n= n , n=0,1 ,

H1: x n=

k=0 N

h ks n−k  n (3)

Where the discrete signal at receiver is denoted by x  n,s nis the source signal,h kis the channel response, Nis the order of channel andnare the noise samples. Considering a subsample L of consecutive outputs and defining

x  n=

[

x  n , x n−1 ,, x  n−L 1

]

T

n=

[

n  , n−1 ,, n−L1

]

T

s n=

[

sn , s n−1 ,, sn−N1L1

]

T

(4)

we get

x  n=H sn n   (5)

whereHis a L× NL matrix, defined as

H=

[

h0  ⋯ h N  ⋯ 0

⋱ ⋱

0 ⋯ h 0 ⋯ h N 

]

  (6)

The following assumptions on the statistical proprieties of the transmitted symbols and channel noise are assumed:

A) Noise is white

B) Noise and transmitted signal are uncorrelated.

LetR Nsbe the sample covariance matrix of the received signal, that is,

(29)

R Ns= 1 Ns

n =L L−1Ns

x n xHn (7)

where Nsis the number of collected samples. If Nsis large, based on the assumptions A and B, we can verify that

R Ns≈R=E  x n xHn =HRsHH2IL (8) whereRsis the statistical covariance matrix of the input signal,

Rs=E sn sHn, 2 is the variance of the noise, andILis the identity matrix of order L.

Let maxand minbe the maximum and minimum eigenvalues of R, and max and minbe the maximum and minimum eigenvalues of H RsHH. Then

max= max2 and min= min2. Obviously, max= minif and only if H RsHH=ILwhereis a positive number. If there is no signal, max/ min=1; otherwise, max/ min1. Thus the ratio can be used to detect the presence of the signal.

3.3.3 The algorithm to find the eigenvalues

There are many methods to estimate the eigenvalues of a matrix, but in this case the Singular Values Decomposition (SVD) is used because it's reliable and accurate. Thus, this subsection explains how SVD is useful to calculate the eigenvalues[25] of the covariance matrix. For a time series x  nwith n=1,2 ,, N we can fill a Hankel matrix withN −L1rows and L columns illustrated as follows:

Q=

[

q  N −L1 q  N −L2 ⋯q 1q 2 q 2 q 3 q L1q  N q L 

]

  (9)

using the SVD,Qcan be factorized as

Q=U  VH  (10)

(30)

Signal Detector

where U and V are an N −L1× N −L1 and a L×L unitary matrix, respectively. The columns ofUandVare called left and right singular vectors, respectively. =diag1, 2,,m is a diagonal matrix whose nonnegative entries are the square roots of the positive eigenvalues ofQ QH. These nonnegative entries are called singular values ofQand they are arranged in a decreasing order with the largest on in the upper left-hand corner. It's noted thatQ QH=Rso this method allows to calculate the eigenvalues without to build the covariance matrix.

3.3.4 Threshold definition

To find the threshold for the statistical test it's important to study the statistical distribution of the covariance matrix. Since a finite set of samples is considered, the sample covariance matrix R Nsmay be well away to the covariance matrixRand its distribution becomes hard to find. Moreover there is not information about the signal, actually we even don't know if the signal is present or not, so it's difficult to set the threshold on the detection probability and usually the false-alarm probability Pfais used. The threshold and the false-alarm probability can be found with the latest random matrix theories[26]. We consider the sample covariance matrix of the noise:

R Ns= 1 Ns

n =L L−1 Ns

n Hn  (11)

this is a special Wishart random matrix. Recently, I.M. Johnston and K.

Johansson have found the distribution of the largest eigenvalue [27][28] for real and complex matrix, as described in the following theorems:

(31)

• Theorem 1: Assumed real noise, and defining the quantities ANs=Ns

2 RNs

=

Ns−1

ML2

v=

Ns−1

ML

 

N1s−1 1

ML

1/ 3

lim ML

Ns =y , y ∈ 0,1

  (12)

M is the number of receivers that for this detector is one; then the quantity

 A Ns−

v   (13)

converges with probability one to the Tracy-Widom distribution of first order.

• Theorem 2: Assumed complex noise, and ANs=Ns

2 RNs

,=

Ns

ML2

v,=

Ns

ML

 

1Ns

 1

ML

1 /3

lim ML

Ns =y , y∈ 0,1

  (14)

then the quantity

 A Ns−,

v,   (15)

converges with probability one to the Tracy-Widom distribution of second order.

• Theorem 3: Assume that lim ML

Ns =y , y ∈ 0,1  (16)

(32)

Signal Detector

Than lim min

Ns ∞

=21−

y2   (17)

Based in the theorems,

max≈2

Ns

 

Ns

ML

2

min≈2

Ns

 

Ns

ML

2

(18)

Let F1andF2be the cumulative distribution function (CDF) of Tracy-Widom of the first and second order respectively, they are the limiting law of the largest eigenvalue of particular random matrices. It is difficult to evaluate the distribution functions so usually they are calculated numerically.

Using the theory, we can analyze the false-alarm probability:

Pfa=P

maxmin

=P

N2s

max

A Ns

 min

P

max

A Ns



 

Ns−

ML

2

=P

max

A Nv s

−

Ns−

vML

2−

=1−F1

Ns−

vML

2−

  (19)

Hence the threshold should be chosen such that

 

Ns−

ML

2−

v =F1−1

1−Pfa

  (20)

With the relations in 10 and M=1the threshold can be written

=

 

Ns

L 

2

 

Ns−

L 

2

1

NNssL 

−1/ 6L

−2/ 3F−11

1−Pfa

 

  (21)

(33)

For complex signal F1is replaced by F2, the CDF of Tracy-Widom distribution of second order.

(34)

Signal Detector

Chapter 4 

GNU Radio

4.1 Introduction to the testbed

To test the technologies proposed, the signal detector needs to be integrated in a radio system for making a real devices and evaluating its experimental performances. Thus there is a need to find a testbed platform able to implement advanced algorithms and realize a real wireless communication.

It's important that the testbed is extensible, to support different peripherals and interfaces expansions to satisfy future applications, and that its hardware is able to support high speed data transfer. Actually different kinds of testbed exist, all extensible, scalable and programmable, but each one with different characteristics. The choice becomes a trade-off between complexity, performances and costs. In the subsections below, a short analysis of the most important platforms for cognitive radio is presented. Finally, the reasons to use GNU Radio are reported.

(35)

4.1.1 GNU Radio platform

GNU Radio is a free software toolkit for building software radios. Software radio is the technique of getting code as close to the antenna as possible so that it turns radio hardware problems into software problems [29]. The fundamental characteristic of software radio is that software defines the transmitted waveforms, and software demodulates the received waveforms.

GNU Radio provides a library of signal processing blocks and the glue to tie it all together. The programmer builds a radio by creating a graph (as in graph theory) where the nodes are signal processing blocks and the arrows represent the data flow between them. The signal processing blocks are implemented in C++ and the graphs are constructed and run in Python.

GNU Radio is reasonably hardware-independent and the performances depend by the host PC, but, in any case, today a serious digital signal processing is possible on a common computer desktop. The Universal Software Radio Peripheral (USRP) is the recommended device for interfacing GNU Radio with the real world. It is a inexpensive and minimal hardware that, connected to the PC, executes radio front-end functionalities, AD and DA conversion [30].

4.1.2 Wireless open Access Research Platform

Rice University's Wireless open Access Research Platform (WARP) is a wireless platform built to prototype advanced wireless networks [31]. The project of the Rice University is to create a community to enable high- performance research. In this case a custom hardware is necessary: the WARP infrastructure is a complete system with custom hardware, support packages, design tools and application libraries. The hardware uses FPGAs for DSP-optimized development, where the number of FPGAs can be scaled as necessary to deliver increased computational power as needed. The FPGA board uses a Xilinx Virtex-II Pro FPGA as the main processor, which is very

(36)

GNU Radio

well suited for high performance wireless algorithms. The software used to control the hardware is Matlab and Simulink. In any case, to maintain and grow the WARP, an open-access repository, which contains building blocks for a wide range of wireless systems, is available. The open-access repository allows researchers to integrate the standard building blocks with custom components to assemble complete systems [32].

4.1.3 Berkeley Emulation Engine 2

The Berkeley Emulation Engine 2 (BEE2) system is designed to be a modular, scalable FPGA-based computing platform with a software design methodology that targets a wide range of high-performance applications, such as Cognitive Radio [33]. This FPGA design directly embeds the PowerPC 405 processor cores into the reconfigurable fabric, minimizing the latency between the microprocessor and the reconfigurable fabric while maximizing the data throughput. BEE2 is therefore well suited for real-time applications. The BBE2 board includes five Vertex-2 Pro 70 FPGAs, four for numeric computational operations and one to control the board. An important characteristic of BBE2 is its programming environment. Others development platform use sequential high-level language, like C or C++, for the microprocessor and low-level language, like VHDL, for programming FPGAs.

This approach leads to complicated interfaces, specific applications and ad hoc solutions. Instead BEE2 uses a high level unified computation model, based on Mathworks, Simulink and the Xilinx System Generation Library, for both the microprocessor and FPGAs, enabling more flexibility and facility to use. With these elements, BBE2 can provide over 10 times more computing throughput than a DSP-based system, and over 100 times that a microprocessor-based system.

(37)

4.1.4 The choice of GNU Radio

The choice of the platform depends by the context where the detector works.

In this case, the device is included in a Cognitive Radio system, so the choice is not difficult. GNU Radio respects in total the CR approach because it's a software platform that implements a radio system without a dedicated hardware. Moreover GNU radio is a cheap system because it's open source and the USRP is a low cost device. Probably GNU Radio is less efficient than others testbeds, but its performances depend by the host computer, so is not easy to compare the computational efficiency. In any case, its simple architecture allows a easy utilization also because it has a functional graphic interface and it's supported by a lively web community. GNU Radio is a very versatile system used in many applications, so its applicability is guaranteed in the future. In this sense, a signal detector block in GNU Radio system represents the first step for the real CR prototyping.

4.2 GNU Radio Project

GNU Radio is an open source Software Defined Radio (SDR) project that was started about ten years ago by Eric Blossom, an electrical engineer. The main idea of GNU Radio was to turn all the hardware problems into software problems, moving the complexity of a radio equipment from the hardware level to the software one, and get the software as close to the antenna as possible. Richard Stallman, the GNU Project founder, liked Blossom's idea and agreed to take the project under the GNU aegis [34]. Eric Blossom, together with his development colleague Matt Ettaus, have realized a project which can turn an ordinary PC into a good quality radio receiver: it's possible to develop a custom non commercial radio receiver just combining and interconnecting appropriate software modules. The new release of GNU Radio includes functional blocks to support various modulations (GMSK,

(38)

GNU Radio

PSK, QAM, OFDM), error corrections codes (Reed-Solomon, Viterbi, Turbo Codes), and signal processing capabilities (filters, FFTs, equalizers, timing recovery), and, in any case, it's easy to make and add others blocks to the initial library. Each module is able to perform a specific signal processing function with a real-time behavior and with high-throughput.

To make a GNU Radio script is very easy using the graphical tool called GNU Radio Companion (GRC). This program, written in python, allows to edit and to execute a GNU Radio flowgraph connecting the function blocks and setting their parameters. To describe the main features of GRC it is showed in Figure 8.

The interface has four important subsections: the work area where the flowgraph is build, the list of function blocks on the right, the tool bar on the top and a text window below. Users can drag and drop GNU Radio blocks from the list into the work area. The block list contains subsections for different kind of functions and new groups can be make and add. The list

Figure 8: GNU Radio Companion interface

(39)

count more than 150 blocks [29]. GRC represents signal blocks as colored, rectangular blocks. Each block has a label indicating the name of the block and a list of parameters, and has a number of sockets, input and output, that depends by the function. GRC represents a socket as a small rectangle attached to the graphical signal block. The socket has a label indicating its function usually named "in" or "out". Sockets are also are colored to indicate their data type: blue for complex, red for float, green for int, yellow for short and purple for byte. Drawing a line between two sockets with the same label a connection is made. If the flow graph is valid, all parameters are valid and all sockets are connected, it's possible to run the script from the tool bar or press F5. The flow graph is saved in an XML (eXtensible Markup Language) format, and a window will appear with any sliders or graphs that were added.

To stop the flow graph you can close the window, press stop in the tool bar, or press F7. You can check the running state or errors in the text subsection below the work area. In any case, it's possible to check the equivalent python code for the flow graph that GRC makes when the script is executed.

GNU Radio doesn't have a dedicated hardware support, but its interface with the real world is USRP. Actually USRP and USRP2 exist, but in this work only USRP2 (Figure 9) is used because it is a new device.

USRP2 is designed to allow general purpose computers to function as high bandwidth software radios. In essence, it serves as a digital baseband and RF section of a radio communication system. The USRP2 is an integrated board which incorporates AD/DA converters, some forms of RF front end, and an

Figure 9: USRP2

(40)

GNU Radio

FPGA [30]. The basic design philosophy behind the USRP2 has been to do all of the waveform-specific processing, like modulation and demodulation, on the host CPU, while all of the high-speed general purpose operations like digital up and down conversion, decimation and interpolation are done on the FPGA. A typical setup of the USRP2 board consists of one mother board and up to two daughter boards, as shown in Figure 10.

There are two 14-bit AD converters LTC2284 with 100 MS/s and two 16-bit DA converters AD9777[29][35] with 400 MS/s. On the mother board, we can see the DC power input and the Gigabit Ethernet interface that allows applications to simultaneously send 50 MHz of RF bandwidth in and out of the USRP2. Two onboard digital downconverters (DDCs) mix, filter, and decimate (from 100 MS/s) incoming signals in the FPGA Spartan3 2000, XC3S2000-5FGG456 [29][36]. Two digital upconverters (DUCs) interpolate baseband signals to 100 MS/s before translating them to the selected output frequency. Daughterboards mounted on the USRP2 provide flexible, fully integrated RF front-ends. A wide variety of available daughterboards allows you to use different frequencies for a broad range of applications [30]. The

Figure 10: FPGA of the USRP2

(41)

expansion MIMO port allows multiple USRP2 systems: it's possible to connect together more USRP2 to form fully coherent multiple antenna systems for MIMO with as many as 8 antennas. The entire USRP2 design is open source, including schematics, firmware, drivers, and even the FPGA and daughterboard designs. The USRP2 is supported on Linux, but that drivers for Windows, Mac OS X, and other systems will be developed soon.

4.3 Detector block

In this section the code for GNU Radio detector block is described. Actually, two subsections are predicted: the C++ code that implements the GNU Radio function and the XML code to import the block in GRC. Writing a new signal processing block involves creating 3 files: The .h and .cc files that define the new class and the .i file that tells Simplified Wrapper Interface Generator (SWIG) how to generate the glue that binds the class into Python.

SWIG is an immensely useful program that allows you to interface many different interpreted languages with C/C++ code, for purposes of extension or interoperability between languages. Many C/C++ libraries have been ported to Python using this tool, and it allows anyone interested to actually write there own low level code and call it from within Python [37]. The standard procedures to make a new processing block are explained in detail by Eric Blossom in the official web site [38] so, in this chapter, only the detector code will be presented, while the complete code is attached in appendix A.

Every block in GRC has a corresponding XML file that contains parameters, IO ports, and a template for code generation. The guidelines to make it are on the official GNU Radio web site [29], but the main features will be described in the subsection below.

(42)

GNU Radio

4.3.1 Detector Code

The detector code is in the file named howto_detect_ff.cc where the constructor of the class detect is defined. To implement the SVD algorithm“ ” the GSL (GNU Scientific Library) libraries are imported. GSL is a numerical library for C and C++ programmers. It is free software under the GNU General Public License like GNU Radio [39] so fully compatible. To simplify the code reading, three auxiliary functions are made: TracyWidom give the CDF value for the pfa (probability of false alarm Pfa) in input; gamma calculates the threshold for the test with in input the number of samples (see section 3.3.4), the length of the correlation function and the pfa value; test execute the detection test using the eigenvalues ratio and the threshold value.

The prototypes are reported below and the complete functions are in appendix A.

1 float test (float ratio, float t) // test function 2 float gamma (int ns, int L, float pfa) // threshold function 3 float TracyWidom (float pfa) // CDA function

The real code for the detection is the following:

1. int howto_detect_ff::general_work (int noutput_items,

2. gr_vector_int &ninput_items,

3. gr_vector_const_void_star &input_items, 4. gr_vector_void_star &output_items) 5. {

6. const float *in = (const float *) input_items[0];

7. float *out = (float *) output_items[0];

8. float vett [d_samples];

9. int lenght = floor(d_samples / d_L) * d_L;

10. int p, j, k;

11. float thr, lmax, lmin, ratio, TW;

12. gsl_matrix * hankel = gsl_matrix_alloc (lenght,d_L);

13. gsl_matrix * V = gsl_matrix_alloc (d_L,d_L);

14. gsl_vector * S = gsl_vector_alloc (d_L);

15. gsl_vector * temp = gsl_vector_alloc (d_L);

16. FILE *story;

17.

18. k=0; ratio = -1;

19. gsl_matrix_set_zero (hankel);

20. TW = TracyWidom (d_pfa);

21. thr = gamma(lenght, d_L, TW);

22.

23. for (int i = 0; i < noutput_items; i++){

24.

References

Related documents

Methods: Automated signal identification algorithms were applied to multifocal electroretinogram (mfERG) and visual evoked potential (VEP) recordings..

Keywords: multi-period portfolio optimization, portfolio selection, mean-variance op- timization, return predictability, mean reverting processes, transactions costs, market

The variables that are to be used are the target yaw-rate estimated from the steering wheel angle

Top: Estimated local frequency before and after normalized averaging; the smoother trace is after normalized averaging of the es- timate, using the below certainty estimate..

Qualitative and quantitative measurements for the test case developed in reference [52], shows that using the sixth-order and the eighth-order CCFDM and SCFDM for spatial

This feature of a frequency- dependent time window is also central when the wavelet transform is used to estimate a time-varying spectrum.. 3 Non-parametric

O’Boyle (2016) går däremot emot DeNisi och Pritchards (2006) åsikt och hävdade i sin meta-studie att mindre kontrollerande parametrar som binds till organisationens

5.10.4 En förklaring till att flickor är mer positiva till att låta elever läsa extra, kan vara att de är ge- nerellt mer positiva till religion i allmänhet och där igenom även