setup in order to dynamically sense and record TVWS in the city. A National Instruments (NI) USRP 2901 (i.e., Universal. 2017 IEEE 30th Canadian Conference ...
2017 IEEE 30th Canadian Conference on Electrical and Computer Engineering (CCECE)
Sensing TV Spectrum Using Software Defined Radio Hardware Danilo Corral-De-Witt1,2 , Aarron Younan1 , Arooj Fatima1 , José Matamoros2 , Faroq A. Awin1 , Kemal Tepe1 , and Esam Abdel-Raheem1 1
2
University of Windsor, Canada Universidad de las Fuerzas Armadas ESPE, Ecuador
Abstract—The smart use of the radio spectrum is viable with the use of Cognitive Radio (CR) techniques and Software Defined Radio (SDR) hardware. With that, this project aims to detect and utilize vacant TV channels for secondary users. The lack of spectrum sensing techniques and methods to identify the state of the TV spectrum in a particular time and location is a problem which is delaying the effective utilization of unused TV spectrum. This work provides an overview of the process used in order to sense the Ultra High Frequency (UHF) TV spectrum bands in the city of Windsor, Ontario, Canada and discusses some details of the resulting observations. The sensing platform implemented was composed of an SDR, Python application, Arduino-based GPS, and UHF antenna. The prototype is mounted in a vehicle to dynamically detect spectrum bands and the collected data is stored both locally and in a remotely located Data Base (DB). Analysis of the obtained data exhibits the state of the unoccupied spectrum in the frequency range from 500 MHz to 698 MHz in the urban area of the city. This portable prototype is proven to sense TV white spaces with high accuracy.
where w(t) denotes additive white gaussian noise (AWGN), s(t) denotes the received signal, and H0 represents the absence of PU over the channel, whereas H1 represents the presence of the PU over the channel. This motivated us to propose and develop an energy detection based prototype setup with an SDR to sense TVWS. The prototype is examined in a realtime world setting and its detection performance metrics (i.e., true positive and false positive) at different frequency intervals and sampling rates are investigated. This paper is organized as follows: Section II presents the characteristics of TV bands, The proposed prototype setup in Section III, Testing procedure and results are presented in Section IV. Finally, Section V provides the conclusions and the future work.
I. I NTRODUCTION
TVWS refers to segments of the TV spectrum which are not utilized by a PU at a specific time and geographical location [7]. The frequencies assigned to television bands change based on region, for example in Europe, they range from 470 - 790 MHz, and in the USA, they occupy noncontinuous segments between 54 - 698 MHz [8]. The Canadian regulations exclude channels 5 and 6 (76 - 88 MHz) and include channels 52 to 69 (698 - 806 MHz) from the abovementioned [9]. Taking advantage of being in Windsor (i.e., located on USCanada border) the prototype setup is employed to detect both US and Canadian channels (i.e., the bands IV and V from the US frequency plan and channels 14 to 51 from the Canadian frequency plan). Moreover, our location allows us to practically measure the interference of US TV channels to Canadian channels. The frequency range analyzed (500 - 698 MHz) is particularly appealing due to good propagation properties for longrange communications, additionally, and the static TV channel allocations [10]. Note that the ATSC TV signals occupy a bandwidth of 6 MHz.
II. C HARACTERISTICS OF TVWS BANDS SABLE portions of radio spectrum are becoming more scarce with the introduction and the evolution of new wireless communications technologies. Therefore, the IEEE working group has developed standards to better utilize available vacant radio spectrum bands such as TV White Spaces (TVWS) [1], [2]. In order to improve the spectrum utilization, Cognitive Radio (CR) techniques must be employed to detect the underutilized frequency bands. With that, CR allows efficient usage of available spectrum by allowing Secondary Users (SU) to opportunistically share the underutilized frequency band with the Primary Users (PU). In order to employ CR, efficient, reliable, real-time, and scalable channel detection methods are necessary. In that effort, Software Defined Radios (SDRs) provide opportunities to achieve CR functionalities with their flexible hardware capabilities [3], [4]. Energy detection is the most popular technique due to lower computational and implementation complexities; moreover, no prior signal information is needed to detect the existence of a PU [5], [6]. The signal is detected by comparing its signal strength (i.e., energy) with a predefined threshold value. The existence of the PU can be modeled using the following binary hypotheses:
U
H0 : x(t) = w(t),
(1)
H1 : x(t) = s(t) + w(t),
(2)
978-1-5090-5538-8/17/$31.00 ©2017 IEEE
III. P ROPOSED P ROTOTYPE SETUP The objective is to implement a mobile hardware prototype setup in order to dynamically sense and record TVWS in the city. A National Instruments (NI) USRP 2901 (i.e., Universal
2017 IEEE 30th Canadian Conference on Electrical and Computer Engineering (CCECE)
Software Radio Peripheral) is employed as the key functional prototype platform component; since this SDR device can provide a high accuracy sensing due to its receiver’s low noise figure of 5-7 dB [11]. The proposed measurement setup is divided into three main components: Data Collection Environment, Data Visualization, and Algorithm Testing Procedure and Results. A. Data Collection Environment a) Hardware setup: The prototype consists of the following hardware elements: • NI-USRP 2901. • Arduino UNO and Adafruit Ultimate GPS Breakout v3. • Dual-Band 2 meters and 70 centimeters mobile antenna. • GPS-Band active patch antenna model No. GPA-02A. • Micro FL to Female RP-SMA pigtail connector. • WiFi Hotspot for database storage connection. • Computer running GnuRadio Python scripts. The hardware setup interconnection is illustrated in Fig. 1. b) Datalogging: The proposed algorithm for the signal collection environment is designed as two Python scripts which were developed to collect, record and report on the details of whitespace in the band. • A script for data capturing and recording. • A script to generate heatmap using Google Maps. The datalogging script is built using the GnuRadio signal processing framework. The script implements a channel hopping energy detection algorithm in Python. Moreover, the readings are geotagged and stored in a PostgresSQL database as a Comma Separated Values (CSV) file for use in the postprocessing stage. The principle underlying the spectrum sensing portion of the script is based on the signal energy, Ek , at channel k received by the USRP device over a 6.5 MHz bandwidth. This process can be accomplished by dividing the sum of the magnitude squared of measured signal, |xi (∆f )|2 , by the number of collected samples, N , as described in (3). Ek =
N 1 X |xi (∆f )|2 N i=1
Figure 1: Prototype hardware setup.
(3)
Note that Ek is used to determine the likelihood of spectrum occupancy. The lower values represent a lower spectrum occupancy. Once the desired amount of readings, Ek , is obtained, the script moves automatically to the centre frequency of the next channel in the channel list. The datalogging script also contains a subroutine which runs parallel to the data collection process and keeps track of the calculated signal strengths. The channel with the lowest average energy reading will be considered as the Clearest Frequency (CLF) and thus the most amenable channel for transmission. Once all the channels in the list have been exhausted, the SDR is parked on the frequency identified to be Clearest and waits for any subsequent instruction as is illustrated in Fig. 2. Moreover, the proposed algorithm can work in a mobile setting, since it has a capability to run in "Mobile Mode" which starts the scan again upon completion of the channel list instead of parking the SDR. This feature eliminates the need to manually initiate the scan. The tolerance and accuracy of the CLF depends on the number of readings requested to determine the Current Channel Average (CCA). The accuracy of the CLF decision is discussed in detail in section C. Energy detection technique is not accurate this is why the proposed algorithm makes no definitive decision on the actual occupancy of a particular channel. This algorithm is also potentially susceptible to false positives from higher baseline noise figures due to spurious emissions, scanning hardware used and other sources of noise whose origins would be infeasible to establish or for which it would be impractical to compensate. Fig. 2 shows the overall logic flow of the proposed datalogging algorithm. c) GnuRadio Flowgraph: GnuRadio companion is employed to create the skeleton of the data recorder script. The Osmocom Source block forwards the unprocessed IQ signal into two different blocks which process the signal further. The Probe Average Magnitude Squared block turns the incoming IQ stream into an object which is used to poll and measure various characteristics about the probed signal. This probe is, in turn, invoked using the Function Probe block. This block invokes a user-specified function and stores the output in a variable, which can be accessed throughout the Python script. The rate at which this variable is updated by the function probe block can be specified in the poll rate field of the function probe. d) Data Storage: At the completion of each channel hop, the average strength corresponding to a given channel is recorded into both a CSV file and an online Postgres DB as is observed in Fig. 1. Each of those samples is timestamped and geotagged using an Arduino board with SparkFun GPS module combination. The datalogger script asynchronously queries the microcontroller for GPS coordinates at the end of the averaging routine, formats and concatenates the coordinates into an SQL insertion query with the relevant information about the channel being inspected, specifically the channel number, frequency, and signal strength, and then sends it to the database via cellular hotspot which enables mobile connectivity.
2017 IEEE 30th Canadian Conference on Electrical and Computer Engineering (CCECE)
Figure 2: The proposed datalogger program
B. Data Visualization Another Python script generates the code necessary for a graphical representation of the collected information. The script queries the Postgres DB for a list of available readings based on date and time, appropriately formats the data and generates an HTML file containing the heatmap which visualizes a single reading as a circle, with the colour of circle based on the channel number and the radius based on the relative signal strength. Fig. 3 illustrates the collected data in the city of Windsor over Google Map during the frequency scan. The mobile scan option executes the channel hop continuously regardless of the status of the vehicle’s motion; therefore the value displayed on the heatmap represents the value from the last reading taken at a particular point. For instance, if the scanning vehicle is stopped at a traffic signal, the same channel will be scanned twice at this particular coordinates. Due to idiosyncrasies in Google Maps’ HeatMap API and the
Figure 3: Data Visualization, map readings overlay.
way it weights the data points, the radius of the marker circle is an aggregate of that channel’s signal strength; thus skewing the display in favour of points where the car was stopped. In order to avoid this, a function was written to request readings which are distinct on their latitude and longitude. IV. A LGORITHM T ESTING P ROCEDURE AND R ESULTS The decision-making algorithm and the datalogging script require to have the following three parameters • The polling frequency of the probe variable is used to update the value from the function probe’s level and determine the energy of the signal at channel k. • The number of samples to compose the channel average. • The bandwidth of the signal to be captured. The program was tested for scan time and the CLF decision accuracy by collecting statistics on the time and decision while executing the datalogging script at a fixed location with different parameters. The testing routine is divided into three main stages; 250 KHz, 500 KHz, 750 KHz polling frequencies. At each polling frequency, the scan is performed 100 times at each value of N and the CLF decision is recorded as well as the duration of each scan. a) Accuracy: The conditions for the CLF decision accuracy tests were as follows: • Signal bandwidth (∆f ): 5 MHz, 6 MHz, 6.5 MHz. • Samples to collect to compute average signal level (N ): 100 - 350,000 probe values. • Signal polling frequency: trial 1) 250 kHz, trial 2) 500 kHz, trial 3) 750 kHz. • Gain: 76 dBFS
2017 IEEE 30th Canadian Conference on Electrical and Computer Engineering (CCECE)
Table II: Distance between data readings and speed. Speed (Km/h) 100 80 60
Figure 4: True positive rates of CLF decision at 750 KHz polling frequency.
The accuracy test was conducted by running scans of the UHF channels in question with the above conditions 100 times at each value of N . The list of channels was compiled which were manually confirmed to be occupied or unoccupied at the testing site and compared against the algorithm’s decisions for each scan and iteration trade-off. In an attempt to explore a potential link between the accuracy of the CLF decision when varying signal bandwidth, the sample rate, and polling frequency. The test was split into nine total trials, three at each polling frequency and with the bandwidths ranging from 5 MHz to 6.5 MHz, 6 MHz being the width of a single ATSC channel. The attained results show that the performance of the proposed algorithm improves with a signal bandwidth of both 6 MHz and 6.5 MHz around the region of 50,000 samples since the true positive rates roughly approach unity as N becomes larger as demonstrated in Fig. 4. However, when working with a bandwidth which is smaller (i.e. the 5 MHz trials) than a standard ATSC signal, the algorithm poorly performs relative to the trials which measured the channel over a wider bandwidth. Moreover, the false positives, in the worst case, reaches 56 percent. b) Timing: It was noticed that the value of N has an effective impact on the duration of the scan, while the variations in polling frequency exhibits a minimal impact on the scan duration as demonstrated in Table I. Moreover, the accuracy of the CLF decision exhibits a strong dependence on the value of N to be used in computing Ek as well as, to a lesser extent, the value of ∆f relative to the bandwidth of an actual ATSC signal. Similarly, the amount of time taken by a complete scan of the band linearly increases with N , presenting an obvious trade-off between accuracy and speed. Table I: Samples Vs Polling Frequencies. hhhh hhh Poll Freq 250 KHz 500 KHz 750 KHz hhhh Samples (N) 10000 50000 75000 100000 350000
2.52s 4.63s 6.18s 7.47s 20.60s
3.28s 5.47s 7.54s 7.52s 23.36s
2.47s 5.42s 6.20s 9.63s 24.43s
Distance between reading data (m) 172.22 137.77 103.33
c) Distance between data read: Setting a polling frequency of 750 kHz, and selecting N = 75, 000 samples, the true positive rate of the CLF decision is in the area of 95 percent, the total time to collect the information from the band of interest is about 6.20 seconds, as shown in Table I. If the recording vehicle moves with a variable speed between 0 and 100 Km/h, then the geographic resolution of the readings varies as demonstrated in Table II. Distances are in reasonable ranges to detect any possible change in TV broadcast frequencies along the planned trajectory. V. C ONCLUSIONS AND F UTUREWORK A prototype for sensing TVWS has been proposed. The prototype has been employed to dynamically detect TVWS in the city of Windsor, and it is possible to replicate in any other place. The measurements have shown that number samples drastically affects measured the positive true rate of CLF decision. Moreover, measurement accuracy depends on the number of samples, bandwidth, and frequency hopping. As a future work, the prototype will be employed to exploit the TVWS for public safety service and disaster relief purposes, to set up a deployable communications system. R EFERENCES [1] S. J. Shellhammer, et al. "Spectrum sensing in IEEE 802.22". IAPR Wksp. Cognitive Info. Processing, pp. 9-10, 2008. [2] T. X. Brown, et al, " A survey of TV white space measurements, International Conference on e-Infrastructure and e-Services for Developing Countries, Springer International Publishing, 2014. p. 164-172. [3] H. Arslan, "Software Defined Radio Architectures for Cognitive Radios". Cognitive Radio, Software Defined Radio, and Adaptive Wireless Systems, Springer, 2007. [4] A. Ahmed, Y.F. Hu,Jim. M. Noras. "Enhanced Energy Detection Based Spectrum Sensing in Cognitive Radio Networks using Random Matrix Theory". International Symposium on Communication Systems, Network and Digital Sign, pp. 384-389,2014. [5] D. Cabric, T. Artem, and R. W. Brodersen. Spectrum sensing measurements of pilot, energy, and collaborative detection. MILCOM 2006 IEEE Military Communications conference, 2006. [6] Zeng, Yonghong, et al. "A review on spectrum sensing for cognitive radio: challenges and solutions". EURASIP Journal on Advances in Signal Processing, vol. 1, 2010. [7] T. Baykas et al. "Overview of TV White Spaces: Current regulations, standards and coexistence between secondary users". IEEE Personal, Indoor and Mobile Radio Communications Workshops (PIMRC Workshops), pp.38-43, 2010. [8] T. Baykas, et al, "Developing a standard for TV white space coexistence: Technical challenges and solution approaches". IEEE Wireless Communications, No. 19, vol. 1, 2012. [9] Industry Canada. (2017, February 13) Canadian Table of Frequency Allocations [Online]. Available: http://www.ic.gc.ca/eic/site/smtgst.nsf/eng/sf10759.html#t2 [10] D. Cabric, "Implementation issues in spectrum sensing for cognitive radios". IEEE 38th Asilomar conference on. Signals, systems and computers, pp. 772-776, 2004. [11] National Instruments. (2017, February 13). Device Specifications NI USRP-2901 [Online]. Available: http://www.ni.com/pdf/manuals/374925b.pdf