Open James Kelly Software Defined Radio Receiver.Pdf
Total Page:16
File Type:pdf, Size:1020Kb
THE PENNSYLVANIA STATE UNIVERSITY SCHREYER HONORS COLLEGE SCHOOL OF ELECTRICAL ENGINEERING AND COMPUTER SCIENCE SOFTWARE DEFINED RADIO RECEIVER JAMES PATRICK KELLY SPRING 2017 A thesis submitted in partial fulfillment of the requirements for a baccalaureate degree in Electrical Engineering with honors in Electrical Engineering Reviewed and approved* by the following: James K. Breakall Professor of Electrical Engineering Thesis Supervisor Julio V. Urbina Associate Professor of Electrical Engineering Honors Adviser * Signatures are on file in the Schreyer Honors College. i ABSTRACT With the ever-expanding need of different forms of communication, a demand for a cost effective means of prototyping devices has risen. Modifying already existing pieces of hardware can often be very expensive or not possible at all. A software defined radio (SDR) provides a solution to this problem, providing flexibility and cost efficiency when developing new communications technology. A software defined radio is defined by IEEE as “radio in which some or all of the physical layer functions are software defined” [1]. Essentially, software defined radio is a radio communications system in which components that are typically implemented as physical pieces of hardware (such as amplifiers, mixers, filters, etc.) are implemented through software on a computer. One of the major advantages of a software defined radio is the flexibility it offers in allowing one piece of hardware to perform multiple functions. For example, when programmed one way, an SDR receiver can function as an AM receiver, but when programmed another way, it can function as a SSB receiver. In this thesis, I will outline programs I created in GNU Radio, an open source SDR development toolkit, which will allow the Ettus USRP N200 software defined radio receiver to function as an AM receiver, a SSB receiver, and a waterfall spectrum analyzer. Furthermore, I will display some of the capabilities of the GNU Radio software when it comes to modulating and demodulating signals through different methods. ii TABLE OF CONTENTS LIST OF FIGURES ..................................................................................................... iii LIST OF TABLES ....................................................................................................... iv ACKNOWLEDGEMENTS ......................................................................................... v Chapter 1 GNU Radio and SDR .................................................................................. 1 Chapter 2 AM Receiver ............................................................................................... 3 Chapter 3 SSB Receiver............................................................................................... 7 Chapter 4 Waterfall Spectrum Analyzer ...................................................................... 10 Chapter 5 Differential Phase Shift Keying .................................................................. 12 Chapter 6 Quadrature Amplitude Modulation ............................................................. 17 Chapter 7 Phase Shift Keying ...................................................................................... 22 Chapter 8 Conclusion and Future Works ..................................................................... 27 Appendix A Additional Modulation Simulations ....................................................... 28 BIBLIOGRAPHY ........................................................................................................ 32 iii LIST OF FIGURES Figure 1. Block Diagram of Ettus USRP N200 [4] .................................................................. 2 Figure 2. Graphical Representation of Amplitude Modulation [6] .......................................... 3 Figure 3. GNU Radio AM Receiver Program .......................................................................... 4 Figure 4. FFT Plot of Data from the File Source ..................................................................... 5 Figure 5. FFT Output of AM Program ..................................................................................... 6 Figure 6. Signal with Carrier Frequency before and after USB and LSB Separation [8] ........ 7 Figure 7. SSB GNU Radio Program ........................................................................................ 8 Figure 8. Output of the SSB Receiver Program ....................................................................... 9 Figure 9. Waterfall Spectrum Analyzer GNU Radio Program ................................................ 10 Figure 10. Output of Spectrum Analyzer Program .................................................................. 11 Figure 11. Visual Representation of DQPSK [11] ................................................................... 12 Figure 12. DQPSK Modulation and Demodulation GNU Radio Program .............................. 13 Figure 13. Comparison of 4-DPSK Binary [12] and Output of DPSK Mod GNU Block ....... 14 Figure 14. Real and Imaginary Parts of Baseband Signal ........................................................ 15 Figure 15. Output of DPSK Demodulator ............................................................................... 16 Figure 16. Visual Representation of QAM [15] ....................................................................... 17 Figure 17. QAM Modulation and Demodulation GNU Radio Program .................................. 18 Figure 18. Comparison of 16 QAM [16] with Output of GNU QAM Mod Block .................. 19 Figure 19. Real and Imaginary Parts of the QAM Modulate Signal ........................................ 20 Figure 20. Output of QAM Demodulator GNU Block ............................................................ 21 Figure 21. Visual Representation of PSK [19] ........................................................................ 22 Figure 22. PSK Modulation and Demodulation GNU Program .............................................. 23 Figure 23. Comparison of 4-PSK and DQPSK Constellation Plots ......................................... 24 Figure 24. Real and Imaginary Parts of the Modulated PSK Signal ........................................ 25 iv Figure 25. Output of PSK Demodulator GNU Block .............................................................. 26 v ACKNOWLEDGEMENTS Thank you to Dr. Jim Breakall for allowing me to do this work under your guidance, and for inspiring me to pursue a career path in antenna engineering. Thank you to Salih Bostan for helping me with GNU Radio and spending all the time helping me troubleshoot the issues with my programs. Thank you to Tony Reggio for pushing me early on in my academic career, and for teaching me valuable life lessons throughout the semester I had you as a professor. Thank you to Colonel Vincent Tedesco Jr. for the advice and guidance when it came to deciding with what company I want to begin my engineering career. Thank you to Lauren Donohoe for always being available to give me great advice. Finally, I want to thank my parents, Jim and Sally, for always pushing me throughout my academic career. Without your guidance and “tough love” I undoubtedly would not have been as successful as I have been throughout my college career. 1 Chapter 1 GNU Radio and SDR GNU Radio is a “free, open source software development toolkit that provides signal processing blocks to implement software radios” [2]. GNU Radio operates very similarly to Simulink, in the sense that all programming is achieved through block diagrams and very little to no actual coding. GNU Radio works best on Linux operating systems, and for this project, the open source Linux operating system Ubuntu version 16.04 was used to run GNU Radio. Finally, GNU Radio operates from python source code. The Ettus USRP N200 Software Defined Radio (SDR) in this case operates from DC to 50 MHz through the use of a 50 MHz daughterboard. It interfaces to the computer through a minimum 1 GB Ethernet cable, and the main driving force behind the unit is a Xilinx Spartan 3A-DSP 1800 FPGA [3]. The programs created in GNU Radio will program the SDR to function as an AM receiver, SSB receiver, and a waterfall spectrum analyzer. The verification of the functionality of these programs is achieved through replacing the SDR source with a file of a recording of signals received by the B200 model SDR. The data was recorded at a 256 kHz sampling rate. GNU Radio also has powerful signal processing blocks that can be used to demodulate signals that are transmitted in different formats. Programs were created that function as a phase key shifting (PSK) demodulator, differential phase key shifting (DPSK) demodulator, and a quadrature amplitude modulation (QAM) demodulator. 2 Figure 1. Block Diagram of Ettus USRP N200 [4] Figure 1 shows the block diagram of how the Ettus USRP N200 and B200 function. The N200 and B200 have the function of being a transmitter (TX) as well as a receiver (RX). In this project, the only function necessary to complete the desired outcome is the receiver function from RX2. 3 Chapter 2 AM Receiver Amplitude Modulation (AM) signal transmission functions by varying the amplitude of a radio carrier wave in proportion to the transmitted waveform as outlined in Figure 2. It is used widely for broadcasting on short, medium, and long wave bands, and the signals tend to be easy to demodulate [5]. Figure 2. Graphical Representation of Amplitude Modulation [6] In this GNU Radio program, the file source is several seconds of data recorded