lab_1

11
GNU Radio / USRP Overview

description

USRP lab using Gnuradio. First Lab

Transcript of lab_1

  • GNU Radio / USRP Overview

  • Software Defined Radio (SDR)

    Termed coined by Mitola in 1992 Radio`s physical layer behavior is primarily defined in

    software Accepts fully programmable traffic & control information Supports broad range of frequencies, air interfaces, and

    application software Changes its initial configuration to satisfy user requirements

    2

  • GNU Radio

    3

    Origin : MIT`s SpectrumWare (mid` 90s) Software toolkit for signal processing

    Software radio construction Rapid development Cognitive radio

    USRP (Universal Software Radio Peripheral) Hardware fronted for sending and receiving waveforms

  • System Architecture

    4

  • GNU Radio Software Core

    5

    Write signal Processing Block in C++ Build signal Flow graph with Python Object Oriented Programming

  • Basics : Blocks

    Signal Processing Block Accepts 1 or more input

    streams Produces 1 or more output

    streams

    Source : No input noise_source,

    signal_source, usrp_source

    Sink : No outputs audio_sink, usrp_sink

    6

  • Basics : Data Streams

    Blocks operate on streams of data

    7

    11 55 33

    33 77 99

    44 1212 1212

  • Basics : Data Types

    Blocks operate on certain data types byte, int, float, complex

    Input Signature : Data types for input streams

    Output Signature : Data types for output streams

    8

    Two streams of float

    One stream of complex

  • Basics : Flow Graph

    Block composed as a flow graph Data stream flowing from sources to sinks

    9

  • 1. Open a terminal and type grc and open a new project 2. Double click the Options block and name the project title and author. (Generate

    Options to WX GUI, Run to Autostart, and Realtime Scheduling to Off) Observe the default sample rate is set to 48000 samples/sec in the Variable block, which will be used in other blocks

    3. On the right side, find Signal Source from Sources category. Bring it to the main window. Double click Signal Source block and change the output type to Float, frequency to 1000, and amplitude to 0.5.

    4. Add another Signal Source of frequency 800 and amplitude 0.5. Combine the two sources using Add block.

    5. Click on the out port of Signal Source and in port of Add block to make connections.

    6. Add Audio Sink block and change the sample rate to 48KHz . 7. Find FFT Sink from Graphical Sinks category to bring it to the main window.

    Change the type to Float 8. Click on the out port of Add block and in port of FFT Sink and Audio Sink blocks

    to make connections. 9. Save the grc file and Click Generate the flow graph icon. Notice that there is a

    warning message at the bottom of the window. Add Throttle block in Misc category in between Add block and sink blocks

    10

    Lab homepage http://monet.postech.ac.kr/class/lab/

  • 10. Click Generate the flow graph icon again. No warning now. Then, click Execute the flow graph icon to execute it

    11. Can you hear the composite tone and see the FFT sink display of the spectrum? Experiment with varying the FFT size in the FFT Sink block. Note that as you increase the FFT size the resolution of the display increases. Reset the FFT size to 1024 when you are done.

    12. Add a Variable Slider block from Variables category and change ID to freq2, default value to 800, minimum to 10, maximum to 2000.

    13. Double click the Signal Source (set to 800) block and change the frequency (800) to freq2.

    14. Execute the flow graph. You should observe that both the spectrum and the sound change as you vary the frequency of the Signal Source block using the slider.

    15. Add a Variable Text Box block and change ID to level2, default value to 0.5. 16. Double click the Signal Source (set to 800) block and change the amplitude (0.5)

    to level2. 17. Execute the flow graph. Can you see a text box in the display? 18. Add a Variable Chooser block and change ID to freq1, default value to 1000,

    choices to [500, 1000, 1500], type to Radio Buttons. 19. Change the frequency of the Signal Source (set to 1000) block to freq1. 20. Execute the flow graph and change the frequency using the radio buttons.

    11

    GNU Radio / USRP OverviewSoftware Defined Radio (SDR)GNU RadioSystem ArchitectureGNU Radio Software CoreBasics : BlocksBasics : Data StreamsBasics : Data TypesBasics : Flow GraphSlide Number 10Slide Number 11