Jun 1, 2016 - 51. GTRI. SDR Hardware. ⢠Ettus USRP ... NI LabVIEW*. ⢠REDHAWK ..... https://www.ettus.com/product/details/E310-KIT. *Not free, no public ...
Open-Source SDR on Embedded Platforms June 1, 2016 Dr. Rajib Bhattacharjea Georgia Tech Research Institute Information and Communications Lab Atlanta, GA 30318, USA 1
GTRI
Part 1 Overview • Prereqs • Topics to be covered • SDR background • SDR uses and users • SDR components • Demo 1
2
GTRI
Prerequisites • Radio/Comms Fundamentals - Analog and Digital Modulation - Mixers, filters, LNA, PA
• Circuit analysis concepts - Transistors - Filters
• Software concepts - High level language source code - Assembly language
• Digital and analog signal processing concepts - Convolution - FFT - Dot products
3
GTRI
What We’re Going to Learn About (and play with)
4
GTRI
Single Board Computers!
http://hackerboards.com/ringing-in-2016-with-64-open-spec-hacker-friendly-sbcs/ 5
GTRI
Embedded Computers from the Living Room!
6
GTRI
Signal Processing with Open Source Tools!
http://wiki.opendigitalradio.org/FM_RDS_Stereo_transmitter_using_gnuradio 7
GTRI
Software Defined Radio Hardware!
8
GTRI
What We’re Going to Learn About • Overview of available open-source software and embedded hardware tools for SDR development • Signal processing • RF signals • How to get started with SDR on popular embedded platforms - ARM or x86 embedded CPU - Linux
• Commercial SDR hardware • Optimized signal processing capabilities available on embedded platforms
9
GTRI
What We’re Not Going to Learn About • OpenEmbedded, yocto, poky, bitbake…although those would help you with devices that don’t have packages in the distros, or for developing reproducible builds for distribution. • Embedded CPU Hardware without available Linux kernel • IBM Power ISA, µC(Linux), MIPS, SPARC, etc. - Although the open source SDR ecosystem could be made to run on these kinds of platforms with various degrees of effort - MIPS is especially low hanging fruit and much of this talk applies to those devices too - Dedicated DSP chips
• “IoT” but only because we’re not talking directly about what data goes over the radio links we’re talking about. If it was some kind of sensor data, this would be an IoT talk. • OSSIE (is it dead?) 10
GTRI
Background (who, what, when, where, why, how?)
11
GTRI
What is a Software-Defined Radio? • A communication system where the capabilities are largely determined by the software running on the system instead of by the radio hardware. • Consists of radio hardware and something to do the signal processing. • The term “SDR” can mean the whole system, or just the radio hardware. • Let’s consider a series of examples
12
GTRI
Conventional Radio Example: Super Regenerative FM Receiver
Design from: http://electronics-diy.com/simple-fm-radio.php 13
GTRI
Conventional Radio Example: Super Regenerative FM Receiver • It’s purpose built for a specific task • Designed to tune over 88 MHz – 108 MHz
• It isn’t easily reconfigurable and can perform no other task - The hardware defines the functionality - Many functional stages are collapsed into one; the one JFET is the: • Oscillator
• Mixer • Amplifier • Filter
• Uses VERY few components, only enough to achieve the function it is designed for
14
GTRI
Conventional Radio Example: Superheterodyne FM Receiver
15
GTRI
Conventional Radio Example: Superheterodyne FM Receiver
Superheterodyne receiver schematic by Appaloosa released under CC-BY-SA 3.0 license. https://commons.wikimedia.org/wiki/File:Tuner1.svg 16
GTRI
Conventional Radio Example: Superheterodyne FM Receiver
17
GTRI
Conventional Radio Example: Superheterodyne FM Receiver
Design from: http://www.daenotes.com/electronics/communication-system/superheterodyne-fm-receiver 18
GTRI
Conventional Radio Example: Superheterodyne FM Receiver
Design from: http://www.radio-electronics.com/info/rf-technology-design/fm-reception/foster-seeley-fm-detector-discriminator.php 19
GTRI
Conventional Radio Example: Superheterodyne FM Receiver • It’s purpose-built for a specific task • Designed to tune over 88 MHz – 108 MHz
• Design is more modular than the super regenerative design - Amplification, frequency synthesis, frequency mixing, and a multistage demodulator
• Hardware defines the functionality - Could change out the limiter and discriminator for a simple envelope detector and get an AM radio receiver - Or a PLL and detect FSK
• Design is more complicated and uses about 7 times the number of overall components and 5 times the number of transistors
20
GTRI
Software Defined Radio: Superheterodyne w/ an ADC
21
GTRI
Software Defined Radio: Superheterodyne w/ an ADC • Not purpose-built for a specific task! • Tuning range can be large
• Signal processing is not done by a circuit designed for demodulation or discrimination of a specific type of waveform • Software signal processing defines the functionality - Hardware determines characteristics (tuning range, max instantaneous bandwidth, noise performance)
22
GTRI
Who Uses SDR and Why? • Engineers in R&D • Academics
• Enables cutting edge research • Speeds prototyping of new radio designs and signal processing algorithms • Allows one radio to support different waveforms • Permits radio designs to be upgraded without buying new hardware • Facilitates detailed offline signal analysis
• US Military - JTRS - SCA
• US Intelligence Community • Amateur radio enthusiasts (hams) • Others
23
GTRI
Who uses SDR and Why? Video • https://youtu.be/Lv-vkBNzZwE
24
GTRI
SDR Users / Developers in the DoD and IC • The Army, Navy, Air Force, and Marine Corps • “No Such Agency” in Fort Meade, MD - https://www.google.com/#q=nsa+redhawk
• Defense Contractors - Harris
http://rf.harris.com/media/RF-7800V-HH_Enlarged_26-12108.jpg 25
GTRI
Components of an SDR • Analog front end - Quadrature demodulator - Wide or narrow tuning range - Wide or narrow bandwidths - RX Only, TX/RX half duplex, TX/RX full duplex, TX/RX MIMO configurations typical
• ADC - Direct sampling ADC is a possibility, limits “tuning” range to (0,fs/2)
• Baseband processor w/ high speed interface - FPGA
- CPU - µC
• Signal processing software 26
GTRI
Components of an SDR: Front-end
27
GTRI
Components of an SDR: Baseband Processor • Embedded device with a CPU or µC • FPGA
28
GTRI
Demo 1 - CPU Frequency Demodulation
29
GTRI
Questions?
30
GTRI
Part 2 Overview • Embedded platforms • Consumer electronics embedded • Capabilities • Types • Will it SDR? Demos 2 – 4 • Embedded ARM landscape • SDR hardware options
31
GTRI
Embedded Processors (low power brains)
32
GTRI
Ubiquity of Embedded Platforms • Embedded processors or µCs are in - Car - Television - Speakers - Sound system - Wifi router - GPS receiver - Cable modem - Camera
- Vacuum cleaner - Refrigerator - Watch 33
- Calculator, etc.
GTRI
Consumer Electronics Embedded Platforms • Largest consumer electronics companies all sell embedded devices - Connected TV devices - Tablets - more than 250 million projected to sell globally in 2016[1] - Smartphones – 1.4 billion units sold in 2015[2]
• Android and iOS devices drive this market - Google - Apple - Samsung - Amazon
[1] http://www.gartner.com/newsroom/id/2954317 [2] http://www.statista.com/topics/840/smartphones/ 34
GTRI
Consumer Electronics Embedded Platforms • These embedded CPUS go by the name “applications processors” • Hardware manufacturers amortize investment into a technology; technology trickles laterally into the maker/hacker, educational, and industrial, and commercial communities - Broadcom markets the BCM2820 as “optimized for high volume markets including mobile phones, mobile TVs, and portable audio/video/game devices”[1]
- Sells the almost identical BCM2835 as a learning platform to the Pi Foundation - R&D companies ship Raspberry Pi’s to their customers in other products
• This is the class of embedded hardware we are talking about today
[1] https://www.broadcom.com/press/release.php?id=929312
35
GTRI
What Drives the Capabilities? • Often, the killer app: streaming, decoding, and playback of media - Special CPU instructions - Media processor / GPU hardware - Some of this capability might help in radio signal processing, more on this later
• This talk focuses exclusively on ARM and Intel - Linux runs effortlessly, entire open-source ecosystem is available - Can be extended to anything that runs a full, modern Linux kernel (MIPS24K in particular)
36
GTRI
Types of Consumer Electronics Embedded Platforms
37
GTRI
Set Top Boxes • Class of devices used for consumption of media on TV screens • Options: - Roku devices - Apple TV - Amazon Fire TV - WDTV - NVIDIA Shield - Many, many lesser known brands (check online retailers for “Android TV” or “set top box”)
38
GTRI
Set Top Boxes: Will it SDR? Yes it will!
http://www.cnx-software.com/2015/12/06/how-to-run-headless-linux-on-amlogic-s905-devices-such-as-mini-mx-or-k1-plus/ 39
GTRI
Stick Computers • New class of small form-factor computers for vending signs, kiosks, TV streaming, etc. • Options: - Intel Compute Stick - Amazon Fire Stick
- Lenovo IdeaCentre - Asus Chromebit - Azulle Quantum Access - MeeGoPad devices - And others…
40
GTRI
Stick Computers: Will it SDR? • Demo 2: Dongles on dongles • Yes it will!
41
GTRI
Mini PCs • Like a stick computer but slightly larger and the HDMI port goes the other way • Generally more ports and/or storage • Options: - Kangaroo MD2B - Vensmile iPC002 - Compulab MintBox Mini
42
GTRI
Mini PCs: Will it SDR? • Demo 3: Vensmile Mini PC SDR • Yes it will!
43
GTRI
Single Board Computers (SBCs) • Options:
• Like a mini PC without the case
44
GTRI
Raspberry Pi BeagelBone Black Banana Pi Banana Pro M2 Lemaker Guitar Adapteva Parallella 16 CubieBoard4 CC-A80 DragonBoard 410c Odroid XU4 Odroid C1+ MinnowBoard Tubot Intel Edison Nvidia Jetson TK1 Nvidia Jetson TX1 And others…
Single Board Computers
http://hackerboards.com/ringing-in-2016-with-64-open-spec-hacker-friendly-sbcs/ 45
GTRI
Single Board Computers: Will it SDR? • Demo 4 – single board computer SDRs - Raspberry Pi 2 - BeagleBone Black - LeMaker Guitar - NVIDIA Jetson TK1 - ODROID XU4+ - ODROID C1+
• Yes it will!
46
GTRI
Plug Computers • A computer with AC mains prongs hanging off the case - Like a wall-wart, but a computer
• The guts are similar ARM processors • A few vendors on the market sell this form-factor
47
GTRI
Plug Computers
48
GTRI
Plug Computers: Will it SDR?
49
GTRI
Embedded ARM Landscape Manufacturer Texas Instruments Broadcom Allwinner Rockchip MediaTek Qualcomm Marvell Amlogic Samsung NVIDIA Apple Actions Semiconductor NXP HiSilicon Atmel Renesas 50
Brand Name OMAP
Snapdragon ARMADA Exynos Tegra AX i.MX, QorIQ SMART SAMA5
End Devices Kindle Fire HD, Droid X, Droid 2 Raspberry Pi Tablets ASUS Chromebook, TV Boxes/Sticks Tablets, Phones Google Nexus One, HTC Incredible Panasonic Toughpad A1, Google Chromecast TV Boxes HP Chromebook, Samsung Galaxy S6 NVIDIA Shield iPhone, iPad, Apple TV, Apple Watch Tablets, TV Boxes Amazon Kindle Huawei Devices Dev Boards Samsung Galaxy Core LTE GTRI
SDR Hardware • • • • • • • • • • • • • •
51
Ettus USRP Great Scott Gadgets HackRF Nuand bladeRF LimeSDR Realtek RTL2832U-based devices Afedri SDR Airspy R820t RFSpace RedPitaya Nutaq PicoSDR, ZeptoSDR PicoZed SDR FunCube Dongle Pro+ SDRPlay RSP And more... GTRI
SDR Hardware: References • https://en.wikipedia.org/wiki/List_of_software-defined_radios • http://sdr-radio.com/Radios
• http://www.rtl-sdr.com/roundup-software-defined-radios/ • http://gnuradio.org/redmine/projects/gnuradio/wiki/Hardware
52
GTRI
Questions?
53
GTRI
Part 3 Overview • Open-source SDR signal processing software • Install guides – Demos 5 and 6
• Non-free tools • Core SDR signal processing operations • Speed and optimization
• Intro to CPU ISA extensions
54
GTRI
SDR Software Options • GNU Radio • Mathworks MATLAB*
• NI LabVIEW* • REDHAWK • Scilab
• Custom signal processing code (C++, Python, etc.)
* Not publicly available on ARM architecture, not free of cost
55
GTRI
Open Source SDR Software: Getting Started • Get a Linux distro - Download and “dd” an image file on to an SD card - Or get it onto the on-board eMMC
• Keyboard, monitor, mouse, etc. - Or setup networking for headless operation
• Install your SDR software - More on this later
56
GTRI
GNU Radio: Getting Started • Install - package manager - Debian derivative - install using apt - Red Hat derivative – install using dnf (yum is deprecated) - Others: zypper, pacman, urpmi, RTM for your distro
• Install – source - Install dependencies from package manager if possible - Then git clone, cmake, make, make install - Cross compilation or other tricks might be necessary Embedded systems are limited in computational power, and GNURadio compilation is CPU intensive • RAM can be an issue • eMMC flash storage can be an issue • Colleague’s GNU Radio compile on a Raspberry Pi took a week •
57
GTRI
GNU Radio Install Demo 5
58
GTRI
REDHAWK • Open source signal processing package largely developed for/by the US government • Supported on RHEL or CentOS Linux distributions; developers implicitly assume x86 • Port of REDHAWK for Ubuntu exists - Old version of RedHawk (1.8.4)
- Old version of Ubuntu (12.04)
• Developer community size is a bit of a mystery - Fewer than 200 questions on the official Q&A site for redhawk software
- Zero questions on the official Q&A site for redhawk-related hardware problems.
• ARM ports will take some work 59
GTRI
REDHAWK • Demo 6: REDHAWK on embedded ARM
60
GTRI
SciLab • Some efforts exist to use a combination of SciLab and GNU Radio • Not developed for SDR work, but for interfacing with data acquisition hardware https://www.researchgate.net/publication/266009629_GNURadio_Scilab_Xcos_and_COMEDI_for_Data_Acquisition_and_Control_An_Open_Source_Alternative_to_LabVIEW
61
GTRI
Non-Free Tools (MATLAB and LabVIEW) • Title of the tutorial contains “Open-Source SDR…” • You can open source the code you write but development tools are not free (neither “freedom” nor “beer”) • Mentioned here for completeness
62
GTRI
Custom Signal Processing / Vendor APIs • Most SDR manufacturers have written C/C++ libraries interfacing to the hardware • These can be variously used directly or through wrapper/binding layers to other languages
63
GTRI
Signal Processing on Embedded Platforms (make it go faster)
64
GTRI
Embedded Processing: Operations and Speed SDR Operations • Modulation
• The modern CPU is optimized for managing the flow of instructions, not quickly executing a small group of instructions
• Entropy and error coding • Encryption • Computationally heavy DSP operations
• CPU manufacturers see this gap, have created special CPU instructions for common DSP or multimedia computations
- Convolutions - FFTs
• Potentially high data rates
65
GTRI
Embedded Processing: Operations and Speed Dot product 𝑀−1
𝑥 𝑛 ∙𝑦 𝑛 =
𝑥 𝑚 𝑦[𝑚] 𝑚=0
#define M (1L dispatch - Empirically fastest implementation - Similar to the FFTW library (“wisdom”)
• ARM NEON and Intel SSE/AVX • If no SIMD acceleration, plain C implementation is used http://libvolk.org/ Image © Marcus Müller
81
GTRI
How to Leverage CPU Extensions: OpenCL • Open Computing Language • C-based language designed for optimizing math heavy operations
• Some constructs are designed to map to SIMD structures on particular hardware - “float4” is a type with four single precision floating point numbers - Can map directly to Intel SSE XMM0-XMM7
• OpenCL code can be compiled for - CPU: uses SIMD / other extensions - GPU: uses massively parallel shader architecture
- Special OpenCL coprocessors: Intel Xeon Phi, Adapteva Epiphany
82
GTRI
How to Leverage CPU Extensions: OpenCL Hardware must have OpenCL implementation available • Intel ships OpenCL implementation for their CPUs
• Official ARM CPU OpenCL using NEON was announced but unavailable? • ARM Mali GPU design does have an OpenCL implementation, more on this later • POCL - Portable Compute Language - OpenCL implementation for ARMv7, x86, MIPS32
83
GTRI
How to Leverage CPU Extensions: OpenCL • Demo 8: OpenCL Acceleration demo with gr-fosphor on Vensmile iPC002 (Intel Atom) • Formerly had to do this on some distros: - https://bitbucket.org/snippets/rajb245/epGzn
• But latest Intel OpenCL Runtime 16.1 supports RHEL, SLES, and Ubuntu - https://software.intel.com/en-us/articles/opencl-drivers
84
GTRI
How to Leverage CPU Extensions: Performance Tuned Libraries Background – BLAS • Basic Linear Algebra Subprograms • API definition of common numerical operations • Level 1: Scalar/vector and vector/vector operations - Rotating 2-vectors, dot products, scalar times vector, vector norms
• Level 2: Matrix/vector operations - Matrix/vector multiplication, triangular matrix system solver, vector outer product
• Level 3: Matrix/matrix operations - Matrix multiplication - Sums of products of matrices
• Do they map directly to signal processing? 85
GTRI
How to Leverage CPU Extensions: Performance-Tuned Libraries • CPU vendors make performance-tuned BLAS (and the related LAPACK) implementations - AMD ACML – open sourced, BLIS is what we want for the CPU, runs on ARM and x86, very portable - Intel MKL – Intel and AMD x86, closed source
• ATLAS project automatically tunes itself on the target hardware, works on ARM • OpenBLAS has comprehensive architecture support 86
https://software.intel.com/en-us/intel-mkl
GTRI
How to Leverage CPU Extensions: Performance-Tuned Libraries Open questions • Integration of high-performance BLAS into GNU Radio? REDHAWK?
87
GTRI
Optimization Path 2: Embedded GPU
88
GTRI
Embedded GPU Landscape • Consumer electronics embedded processors often have specialized multimedia processing hardware / GPU (recall the killer app) End device list not exhaustive
•
IP Holder
Brand Name
Licensees / Manufacturers
End Devices
Broadcom
VideoCore
Broadcom
Raspberry Pi, Samsung Galaxy (various)
ARM Holdings
Mali
Allwinner, Amlogic, MediaTek, Rockchip, Samsung
Samsung Gear/Galaxy/Chromebook (various), Google Nexus 10, ODROID (various)
NVIDIA
Tegra GPU
NVIDIA
NVIDIA Shield, Acer Chromebook, Google Pixel C, HTC Nexus 9
Intel
HD Graphics, GMA, Iris, Iris Pro
Intel
Dell Pro 11 2in1, Lenovo ThinkPad (various), Dell Venue 11 Pro
Qualcomm
Adreno
Qualcomm
Samsung Galaxy (various), Sony Xperia X, HTC 10
Imagination Technologies
PowerVR
Ti, Apple, Intel, Broadcom, Allwinner, Samsung, Rockchip
iPhone (various), iPad (various), Apple Watch, PS Vita, Asus Zenfone 4, ODROID-XU
Vivante Corporation
(None)
Marvell, Freescale, Ingenic Semiconductor, Rockchip
Samsung Galaxy Tab 4, Chuwi V90, Hummingboard (various)
89
GTRI
GPU Processing on Embedded • Mali OpenCL is the only easy option right now - Signal processing with AMD clMath? - Integration into GNU Radio or REDHAWK?
• PowerVR has beta access to OpenCL for developers • NVIDIA has CUDA - Library of functions that turn into highly parallelized code that runs on the GPU - Specific to one vendor
• Some work has been done on Broadcom VideoCore - Assemblers for the VideoCore, including one where you write assembly in python (PyVideoCore) - PyVideoCore has a single example of a single BLAS/LAPACK function
90
GTRI
GPU Processing on Embedded • Demo 9: Mali GPU w/ OpenCL gr-fosphor
91
GTRI
Optimization Path 3: FPGA
92
GTRI
FPGA Processing • Field-programmable gate array - Can be configured to be an arbitrary digital logic circuit (within a size constraint)
• Many of the SDR hardware platforms have an on-board FPGA - Handles interpolation, decimation, fine frequency tuning, digital I/O buses (host and RF front-end)
- HackRF*, Ettus B and N series, bladeRF, and others
• Some embedded processors have an on-die FPGA† - Xilinx Zynq - Altera SoC
*Actually a CPLD, but the difference is in implementation not functionality †Intel Xeon+FPGA is hardly embedded and is vaporware so far 93
GTRI
FPGA Processing • Xilinx Zynq powers three popular SDR platforms - Ettus E310 - Red Pitaya - PicoZed SDR
• Do most of the signal processing on the FPGA
http://www.xilinx.com/products/boards-and-kits/1-askjht.html
• Use the ARM for what’s left • Development Tools - LabVIEW FPGA Module* - MATLAB HDL Coder* - RFNoC https://www.ettus.com/product/details/E310-KIT *Not free, no public ARM release 94
GTRI
FPGA Processing • Demo 9: RFNoC fosphor on the X310 - (Martin Braun’s demo is much better, so we’ll skip this)
95
GTRI
Optimization Path 4: Other Coprocessors
96
GTRI
Special Coprocessors • Xeon Phi - Not embedded yet; power draw is same as thirty SBCs
• Adapteva Epiphany Coprocessor - Has not really caught-on
- Used in one design, the Adapteva Parallella-16 SBC
*
http://www.adapteva.com/epiphanyiii/
*http://www.intel.com/content/www/us/en/architecture-and-technology/many-integrated-core/intel-many-integrated-core-architecture.html 97
GTRI
Conclusions and Summary (what did we learn)
98
GTRI
Conclusions and Summary • Embedded SDR runs the gamut of price and performance - Pi Zero + RTL2832U device - ODroid + Hack RF
- Ettus E310 or PicoZed SDR - NVIDIA Tegra TX1 + Ettus X310
• GNU Radio is the dominant open-source SDR package that is popular for researchers and hobbyists - Others exist but there’s no annual “REDHAWK con”, i.e., the user community and support seems to be best for GNU Radio
• Using available, COTS, embedded hardware and open-source software, any practical radio technology can be implemented - Even experimental technology can be realized - Massive MIMO - Spectrum sensing / cognitive radio 99
GTRI
Conclusions and Summary • You can’t pick up an embedded device and get optimal signal processing performance - Software work to be done to leverage the processing power of the GPUs and SIMD technologies - Should the VOLK project support GPU accelerated implementations? - Should everyone use OpenCL?
- Or should there be accelerated BLAS/LAPACK, and other code can call those functions?
100
GTRI
Conclusions and Summary • It’s an exciting time in embedded SDR! • The unprecedented popularity of mobile, wireless, and TV markets has effectively subsidized the SBC and embedded computer market. • You can realistically learn SDR and signal processing with practical, hands-on experience for the price of a drink at a nice restaurant.
101
GTRI
Acknowledgements • Ben Riley of GTRI for funding IRAD
102
GTRI
Thank You
103
GTRI
Copyright Notice • Copyright 2016, Georgia Tech Applied Research Corporation • Portions of this work are under the copyright of their respective, original rights holders. - No copyright claim is made on these portions. - Where possible, attribution has been given to the original rights holders. - Use of these portions has been for the purposes of comment, teaching, scholarship, and research; as such, the authors of this work assert that this usage constitutes a fair use of the copyrighted material.
104
GTRI
17 U.S. Code § 107 - Limitations on exclusive rights: Fair use • Notwithstanding the provisions of sections 106 and 106A, the fair use of a copyrighted work, including such use by reproduction in copies or phonorecords or by any other means specified by that section, for purposes such as criticism, comment, news reporting, teaching (including multiple copies for classroom use), scholarship, or research, is not an infringement of copyright. In determining whether the use made of a work in any particular case is a fair use the factors to be considered shall include— - (1)the purpose and character of the use, including whether such use is of a commercial nature or is for nonprofit educational purposes; - (2)the nature of the copyrighted work; - (3)the amount and substantiality of the portion used in relation to the copyrighted work as a whole; and - (4)the effect of the use upon the potential market for or value of the copyrighted work.
105
GTRI