GNURadio-FFTS Documentation GNURadio-FFTS Documentation, Release 2.7 2.4GNU Radio The software interface

  • View
    0

  • Download
    0

Embed Size (px)

Text of GNURadio-FFTS Documentation GNURadio-FFTS Documentation, Release 2.7 2.4GNU Radio The software...

  • GNURadio-FFTS Documentation Release 2.7

    Simon Olvhammar

    May 15, 2016

  • Contents

    1 Introduction 3 1.1 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.2 Personal background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

    2 Ettus X310 and Gnuradio 5 2.1 The Ettus USRP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.2 PCIe interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.3 Sampling rates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.4 GNU Radio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.5 Interfacing with JTAG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

    3 Spectrometer Manual 9 3.1 USRP, Computer and Server initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.2 Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.3 Recommended bandwidths [MHz] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.4 List of commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.5 Effective bandwidth and offsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

    4 Code explanation 13 4.1 USRP_start.sh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 4.2 Server.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 4.3 Measurement.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 4.4 Receiver.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 4.5 Analyze.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 4.6 Finalize.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 4.7 Improvements and other toughts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

    5 FPGA implementation using RFNoC 17 5.1 RFNoC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 5.2 GNURadio-FFTS RFNoC modification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

    6 Results and discussion 19

    7 References 21

    8 Appendix 23 8.1 Ettus USRP X310 Data sheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 8.2 UBX-160 Daughterboard Data sheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

    i

  • 9 Indices and tables 29

    ii

  • GNURadio-FFTS Documentation, Release 2.7

    Contents:

    Contents 1

  • GNURadio-FFTS Documentation, Release 2.7

    2 Contents

  • CHAPTER 1

    Introduction

    Software defined radio (SDR) was initially introduced by J.Mitola in 1995 [1]. It can be described as a radio that can change it’s physical equivalance through modifications in software. Since the work of Mitola SDRs has obtained a key role in the development of new radio systems [2] which is in part motivated by the high flexibility and cost effectiveness that a digital solution yields [3]. The main supplier for SDRs today is the Ettus Research and National Instruments company (NI) providing the Universal Software Radio Peripheral (USRP) as the SDR product line [4]. The SDR platform essentially provides a front-end for discretization of the signal as well as a Digital Down Donverter (DDC) chain through the usage of a Field-Programmable Gate Array (FPGA) [5]. The strength and flexibility of the USRP is exposed when combined with software interfaces such as GNU Radio and NI-LabView, providing digital domain signal processing [6].

    Studies of microwave spectral emission from different kinds of molecules is fundamental in the fields of Astronomy and Aeronomy. Hydrogen is the most common substance in the Universe thus making the transition at 21 cm of central interest to astronomers, e.g. for studies of galactic spiral arms. Microwave radiation is also abundant from different gases in the atmosphere, both CO, O2, H2O and O3 exhibit rotational transitions below 150 GHz thus providing a way to study the concentration and distribution of these gases in the atmosphere [7]. The technique most commonly used, for these kinds of studies and observations is Dicke-switching, first introduced by physicist Robert H. Dicke. Dicke- switching is a method that eliminates gain variations in receiver systems by rapidly comparing signals, often labelled signal and reference. The reference can be a source of known temperature, another part of the sky or by defining a reference through mixer tuning. The techniques are referred to as load, sky and frequency-switching respectively [8].

    This documentation briefly explains how a general purpose Dicke-switched Fast Fourier Transform Spectrometer (FFTS) can be achieved using Software Defined Radio (SDR) platforms, i.e. the Ettus USRP x310 interfaced with the signal processing toolkit GNU Radio. However the main function of this documentation is to act as a informational source and usage manual for employees at Onsala Space Observatory (OSO) using the two GNURadio-FFTSs on the site. For that purpose it is mainly the section “Manual” and “USRP and GNURadio” that is relevant.

    1.1 Acknowledgements

    First of all I would like to thank Gunnar Elgered for making this project possible. I would also like to thank Lars Petersson and Peter Forkman for supervising the project and providing me with wonderful insights and supporting me at all times. The SALSA system has been a inspirational source throughout this project and I have Eskil Varenius to thank for that. Mikael Lerner has played a fundemental role in integrating the spectrometer in existing systems and it’s now continous usage would not have happend without him. The spectrometer is fully integrated in his software package BIFROST, providing a truly great interface for Radiometers in Sweden and around the world.

    3

  • GNURadio-FFTS Documentation, Release 2.7

    1.2 Personal background

    I am a bachelor student at Chalmers University of Technology in Sweden and have been, part time, developing a new spectrometer solution for Radio Astronomy and Aeronomy. I am currently pursuing a degree in Master of Wireless and Space Engineering and eventually a Phd.

    4 Chapter 1. Introduction

  • CHAPTER 2

    Ettus X310 and Gnuradio

    The section explains the Ettus USRP architechture, the GNURadio toolkit and deals with topics such as sampling rates and master clock rates. Installation instructions for e.g GNURadio can also be found. Most of the following information can be applied to other Ettus USRP devices.

    2.1 The Ettus USRP

    Ettus Research and the National instruments company provides a broad product line of SDR platforms with e.g dif- ferent frequency coverage and bandwidths [4]. The Ettus USRP X3x0 series is currently the most high performing platform and would be the most suitable for radio systems with high demands on bandwidth and accuracy. The provided General Purpose Input Output (GPIO) interface in the x3x0 series also makes implementations of Dicke- switching an easier task, and as we shall see is fundamental for the FFTS described here. A general USRP architecture is provided in the figure below, specifics may vary depending on the model [5].

    Fig. 2.1: A general Ettus USRP architecture demonstrating the signal chain and processing performed. Based on the Ettus N210 with daughterboard WBX [5].

    5

  • GNURadio-FFTS Documentation, Release 2.7

    The first part of the receiver (RX) chain consist of a fundamental Low Noise Amplifier (LNA) with variable atten- uation exposed in software e.g GNURadio. The signal is further modulated into inphase and quadrature signals I and Q. Analog and Digital (A/D) converters handles the discretization of the RF providing a bandwidth determined by the daughterboard i.e the front-end of the Ettus USRP [2]. The onboard FPGA down converts the signal by an Digital Down Converter (DDC) implementation providing fine frequency tuning and filters for decimation. The data is subsequently exposed to the host computer through Ethernet or PCIe interfaces.

    2.2 PCIe interface

    The PCIe interface provides high data throughput together with low latency, where the latter is a important part for Dicke-switched purposes due to the importance of deterministic timings. However the 10 Gbit ethernet interface provides higher throughput.

    2.2.1 Installation

    The latest PCIe driver can be downloaded here. Follow the instructions at the site to install the driver. This simply involves unpacking the software and running the install script followed by a reboot. Se the manual on how to disable and enable the PCIe drivers. Navigate to http://files.ettus.com for older versions of the driver.

    2.3 Sampling rates

    The x3x0 series delivers up to 200 M samples/s (I/Q), thus your host computer might have trouble keeping up to speed. Overflow, lost samples, is indicated by a an O in the terminal and is an indication that there is a bottle neck at your host. Several things can be done to address this issue.

    First of all is to check that your hardware is up to speed. Check the CPU load, RAM usage and not le