gnuradio

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

GNU Radio Components
Hardware Frontend Host Computer
RF Frontend (Daugtherboard)
ADC/DAC and Digital Frontend (USRP)
GNU Radio Software
http://mobiledevices.kom.aau.dk/fileadmin/mobiledevices/teaching/software_testing/Gnu_radio_lece radio construction Rapid development Cognitive radio
USRP (Universal Software Radio Peripheral)

Hardware frontend for sending and receiving waveforms
GNU Radio Software
Opensource software (GPL)

Don't know how something works? Take a look!
Existing examples: 802.11b, Zigbee, ATSC (HDTV), OFDM, DBPSK, DQPSK
Demos available online (see HW4)
Outline
What is GNU Radio? Basic Concepts

Developing Applications
HW4 Introduction
17
Development Architecture
Python
One stream of complex Two streams of float


Input Signature:


Output Signature:

Data types for output streams
Basics: Flow Graph
Blocks composed as a

flow graph
Data stream flowing from sources to sinks
Example: OFDM Synchronizer
/trac/raw-attachment/wiki/Wireless/gr_ofdm.pdf
Example: Superposition Receiver
Dial Tone Example (1)
from from from from gnuradio import gr gnuradio import audio gnuradio.eng_option import eng_option optparse import OptionParser
Import modules from GNU Radio library
Outline
What is GNU Radio?
Basic Concepts
Developing Applications
HW4 Introduction
8
Basics: Blocks
Signal Processing Block

Accepts 0 or more input
Dial Tone Example (2)
class my_top_block(gr.top_block): def __init__(self): gr.top_block.__init__(self)
Define container for Flow Graph; gr.top_block class maintains the graph
Daughterboards for different frequency ranges
400-500Mhz, 800-1000Mhz, 1150-1450Mhz, 1.5-2.1Ghz, 2.3-2.9Ghz
Available Daughterboard

GNU Radio Hardware Schematic

C++ Signal processing blocks
C++

http://mobiledevices.kom.aau.dk/fileadmin/mobiledevices/teaching/software_testing/Gnu_radio_lecture.pdf
Dial Tone Example
Blocks operate on
streams of data
1 3
5 7
3 4 9 12 12
Basics: Data Types
Blocks operate on

certain data types
char, short, int, float, complex Vectors Data types for input streams
Features

Extensive library of signal processing blocks (C++/ and assembly) Python environment for composing blocks (flow graph)

GNU Radio Hardware
Sends/receives waveforms USRP Features
Host Computer
RX/TX Daughterboar d
ADC/DAC
FPGA
USB Interface
http://mobiledevices.kom.aau.dk/fileadmin/mobiledevices/teaching/software_testing/Gnu_radio_lecture.pdf

Python Application development Flow graph construction
Application management (e.g., GUI) Flow graph construction Non-streaming code (e.g., MAC-layer) Signal processing blocks Certain routines also coded in assembly
streams

Produces 0 or more
output streams

Source: No input
noise_source, signal_source, usrp_source audio_alsa_sink, usrp_sink
Sink: No outputs

Basics: Data Streams
Dial Tone Example (3)
Define and parse command-line options
parser = OptionParser(option_class=eng_option) parser.add_option("-O", "--audio-output", type="string", default="", help="pcm output device name. E.g., hw:0,0") parser.add_option("-r", "--sample-rate", type="eng_float", default=48000, help="set sample rate to RATE (48000)") (options, args) = parser.parse_args () if len(args) != 0: parser.print_help() raise SystemExit, 1


USB 2.0 interface (480Mbps)
FPGA (customizable) 64Msps Digital to Analog converters (receiving)
128Msps Analog to Digital converteres (transmitting)
gnuradio gnuradio richard alimi 3/24/2009 gnuradio? basicconcepts developingapplications hw4introduction what gnuradio? softwaretoolkit signalprocessing softwareradio construction rapiddevelopment cognitiveradio usrp(universal software radio peripheral) hardwarefrontend receivingwaveforms gnu radio components hardware frontend host computer rf frontend (daugtherboard) adc/dac digitalfrontend (usrp) http://mobiledevices.kom.aau.dk/fileadmin/mobiledevices/teaching/software_testing/gnu_radio_lecture.pdf gnu radio software gnu radio software opensourcesoftware (gpl) don?tknow how something works? take existingexamples: 802.11b, zigbee, atsc (hdtv), ofdm, dbpsk, dqpsk extensivelibrary signalprocessing blocks pythonenvironment composingblocks (flow graph) gnu radio hardware sends/receiveswaveforms usrpfeatures usb2.0 interface (480mbps) fpga(customizable) 64mspsdigital analogconverters (receiving) 128mspsanalog digitalconverteres (transmitting) differentfrequency ranges availabledaughterboard 400-500mhz,800-1000mhz
Dial Tone Example (4)
Create and connect signal processing blocks
sample_rate = int(options.sample_rate) ampl = 0.1 src0 = gr.sig_source_f (sample_rate, gr.GR_SIN_WAVE, 350, ampl) src1 = gr.sig_source_f (sample_rate, gr.GR_SIN_WAVE, 440, ampl) dst = audio.sink (sample_rate, options.audio_output) self.connect (src0, (dst, 0)) self.connect (src1, (dst, 1))
#!/usr/bin/env python from from from from gnuradio import gr gnuradio import audio gnuradio.eng_option import eng_option optparse import OptionParser
class my_top_block(gr.top_block): def __init__(self): gr.top_block.__init__(self) parser = OptionParser(option_class=eng_option) parser.add_option("-O", "--audio-output", type="string", default="", help="pcm output device name. E.g., hw:0,0") parser.add_option("-r", "--sample-rate", type="eng_float", default=48000, help="set sample rate to RATE (48000)") (options, args) = parser.parse_args () if len(args) != 0: parser.print_help() raise SystemExit, 1 sample_rate = int(options.sample_rate) ampl = 0.1 src0 = gr.sig_source_f (sample_rate, gr.GR_SIN_WAVE, 350, ampl) src1 = gr.sig_source_f (sample_rate, gr.GR_SIN_WAVE, 440, ampl) dst = audio.sink (sample_rate, options.audio_output) self.connect (src0, (dst, 0)) self.connect (src1, (dst, 1)) if __name__ == '__main__': try: my_top_block().run() except KeyboardInterrupt: pass
GNU Radio
Richard Alimi
3/24/2009
Outline

What is GNU Radio?
Basic Concepts
Developing Applications
HW4 Introduction
2
What is GNU Radio?
Software toolkit for signal
GNU Radio Companion
GNU Radio Companion (Cont'd)
GNU Radio Companion

Design flow graphs graphically Generate runnable code

Demonstration

Noisy sine wave (see sinewave.grc) Sending numbers via OFDM (see numbers.grc)
相关文档
最新文档