GNU Radio Exploring An implementation of LPI radioYuan  Wangyuwang@ucsd.edu09/17/2009
AgendaA shortcut to GNU Radio
Hardware Platform - USRP
DSP Design Flow of GNU radio
Write your own blocks
Implementation of LPI radio transmitter2
System ArchitectureHardware FrontendUSRPHost ComputerRF Frontend(Daugtherboard)ADC/DAC andDigital Frontend(Mothermoard)GNU RadioSoftwareUSB2.0Your code goes here !http://mobiledevices.kom.aau.dk/fileadmin/mobiledevices/teaching/software_testing/Gnu_radio_lecture.pdf
 System Architecture (Cont.)Software CoreKeep in mind: GNU radio has provided some useful APIs for DSP purposeWhat we are interested in is how to use these existing modules that have been provided  in GNU radio to communicate between two end systemsHost ComputerDSPUSBHardware Frontend   USRPRX/TXDaughterboardADC/DACFPGAUSBInterfacehttp://mobiledevices.kom.aau.dk/fileadmin/mobiledevices/teaching/software_testing/Gnu_radio_lecture.pdf
A shortcut to GNU RadioUSRP (Universal Software Radio Peripheral) Motherboard     Up/Down converting, AD/DA converting, USB 2.0 interface     FIR filter Four 64 MS/s 12-bit ADC
 Four 128 MS/s 14-bit DAC
 Four DDC with programmable decimation rates
 Two DUC with programmable interpolation rates
 High-speed USB 2.0 interface (480 Mb/s)
Modular architecture supports wide variety of RFdaughterboards Auxiliary analog and digital I/O support complex   radio controls such as RSSI and AGCFully coherent multi-channel systemsPicture from www.ettus.com
A shortcut to GNU Radio (Cont.)USRP (Universal Software Radio Peripheral) daughterboard     Power Amplifier, Antenna, etc.  DC to 30 MHz receiver/transmitter1 MHz to 250 MHz receiver/transmitter50 to 860 MHz receiver800 MHz to 2.4 GHz receiver750-1050 MHz transceiver1150-1450 MHz transceiver1.5-2.1 GHz transceiver2.3-2.9 GHz transceiver (RFX2400 Using now)50 MHz to 1 GHz transceiver800 MHz to 2.2 GHztransceiver2.4 GHz and 5 GHz dualbandtransceiverPicture from www.ettus.com
USRP Block DiagramPicture from gnuradio.org
AD9862 with DUC (Tx.)Picture from gnuradio.org
DDC in FPGA (Rx.)Picture from gnuradio.org
GNU Radio Software CoreWrite signal Processing Block in C++
Build signal Flow graph with Python
Object Oriented Programming10
 Base Class of GNU radio blockThe prototype of GNU radio block1) gr_sync_block()37101679
Base Class of GNU radio blockThe prototype of GNU radio block2) gr_interpolator_block() 371610101679
Basics: Data StreamsThe prototype of GNU radio block1) gr_decimator_block() 447710166996
GNU Radio Companion (GUI)
Build the DSP flow graph V2#!/usr/bin/env pythonfrom gnuradio import grfrom gnuradio import audiodef build_graph ():sampling_freq = 48000ampl = 0.1fg = gr.flow_graph ()    src0 = gr.sig_source_f (sampling_freq, gr.GR_SIN_WAVE, 350, ampl)    src1 = gr.sig_source_f (sampling_freq, gr.GR_SIN_WAVE, 440, ampl)dst = audio.sink (sampling_freq)fg.connect ((src0, 0), (dst, 0))fg.connect ((src1, 0), (dst, 1))    return fgif __name__ == '__main__':fg = build_graph ()fg.start ()raw_input ('Press Enter to quit: ')fg.stop ()C++C++C++V1My APIAPIsV2C++C++C++V1My APIPython Flow graph
Advanced Topic: Write your own blocksEvery block(everything) is a C++ class typically derived from gr_block or its derived class.

GNU Radio

  • 1.
    GNU Radio ExploringAn implementation of LPI radioYuan Wangyuwang@ucsd.edu09/17/2009
  • 2.
  • 3.
  • 4.
    DSP Design Flowof GNU radio
  • 5.
  • 6.
    Implementation of LPIradio transmitter2
  • 7.
    System ArchitectureHardware FrontendUSRPHostComputerRF Frontend(Daugtherboard)ADC/DAC andDigital Frontend(Mothermoard)GNU RadioSoftwareUSB2.0Your code goes here !http://mobiledevices.kom.aau.dk/fileadmin/mobiledevices/teaching/software_testing/Gnu_radio_lecture.pdf
  • 8.
    System Architecture(Cont.)Software CoreKeep in mind: GNU radio has provided some useful APIs for DSP purposeWhat we are interested in is how to use these existing modules that have been provided in GNU radio to communicate between two end systemsHost ComputerDSPUSBHardware Frontend USRPRX/TXDaughterboardADC/DACFPGAUSBInterfacehttp://mobiledevices.kom.aau.dk/fileadmin/mobiledevices/teaching/software_testing/Gnu_radio_lecture.pdf
  • 9.
    A shortcut toGNU RadioUSRP (Universal Software Radio Peripheral) Motherboard Up/Down converting, AD/DA converting, USB 2.0 interface FIR filter Four 64 MS/s 12-bit ADC
  • 10.
    Four 128MS/s 14-bit DAC
  • 11.
    Four DDCwith programmable decimation rates
  • 12.
    Two DUCwith programmable interpolation rates
  • 13.
    High-speed USB2.0 interface (480 Mb/s)
  • 14.
    Modular architecture supportswide variety of RFdaughterboards Auxiliary analog and digital I/O support complex radio controls such as RSSI and AGCFully coherent multi-channel systemsPicture from www.ettus.com
  • 15.
    A shortcut toGNU Radio (Cont.)USRP (Universal Software Radio Peripheral) daughterboard Power Amplifier, Antenna, etc. DC to 30 MHz receiver/transmitter1 MHz to 250 MHz receiver/transmitter50 to 860 MHz receiver800 MHz to 2.4 GHz receiver750-1050 MHz transceiver1150-1450 MHz transceiver1.5-2.1 GHz transceiver2.3-2.9 GHz transceiver (RFX2400 Using now)50 MHz to 1 GHz transceiver800 MHz to 2.2 GHztransceiver2.4 GHz and 5 GHz dualbandtransceiverPicture from www.ettus.com
  • 16.
    USRP Block DiagramPicturefrom gnuradio.org
  • 17.
    AD9862 with DUC(Tx.)Picture from gnuradio.org
  • 18.
    DDC in FPGA(Rx.)Picture from gnuradio.org
  • 19.
    GNU Radio SoftwareCoreWrite signal Processing Block in C++
  • 20.
    Build signal Flowgraph with Python
  • 21.
  • 22.
    Base Classof GNU radio blockThe prototype of GNU radio block1) gr_sync_block()37101679
  • 23.
    Base Class ofGNU radio blockThe prototype of GNU radio block2) gr_interpolator_block() 371610101679
  • 24.
    Basics: Data StreamsTheprototype of GNU radio block1) gr_decimator_block() 447710166996
  • 25.
  • 26.
    Build the DSPflow graph V2#!/usr/bin/env pythonfrom gnuradio import grfrom gnuradio import audiodef build_graph ():sampling_freq = 48000ampl = 0.1fg = gr.flow_graph () src0 = gr.sig_source_f (sampling_freq, gr.GR_SIN_WAVE, 350, ampl) src1 = gr.sig_source_f (sampling_freq, gr.GR_SIN_WAVE, 440, ampl)dst = audio.sink (sampling_freq)fg.connect ((src0, 0), (dst, 0))fg.connect ((src1, 0), (dst, 1)) return fgif __name__ == '__main__':fg = build_graph ()fg.start ()raw_input ('Press Enter to quit: ')fg.stop ()C++C++C++V1My APIAPIsV2C++C++C++V1My APIPython Flow graph
  • 27.
    Advanced Topic: Writeyour own blocksEvery block(everything) is a C++ class typically derived from gr_block or its derived class.
  • 28.
    Three components1. calit2_manchester_ff.h: Block statement2. calit2_manchester_ff.cc: Block implementation3. calit2.i: SWIG interface4. Other stuffs: Makefile.am, Makefile.swig.gen, testbenchPythonApplication developmentFlow graph constructionC++Signal processing blocksSchedulerControl flow graph
  • 29.
  • 30.
    Existing Projects: 802.11b,UCLA Zigbee, ATSC (HDTV), OFDM, DBPSK, DQPSK
  • 31.
    CGRAN (Comprehensive GNURadio Archive Network)
  • 32.
  • 33.
    Extensive library ofsignal processing blocks(C++)
  • 34.
    Python environment forcomposing blocks (i.e. DSP flow graph)Implementaion of LPI radio Block DiagramAudio SourcePacked to Unpacked*32767Float to short0.32756short0x3E011,0,0,1,1,0,1Chunks to symbolsAmplitude Modulation on differentsub-carriers.1,-1,-1,1,1,-1,1USRPInterleave to N streamsSUMManchester Encoding…To hardware USRP board
  • 35.
    Implementation of LPIradio (cont.) Manchester Encoder+1-11001if(in[i/16] > 0.0) {out1 = 1.0;out2 = 0.0;}else {out1 = 0.0;out2 = 1.0;}//create manchester output and upsample by 8for(int j = 0; j<8; j++){memcpy(&out[i+j], &out1, sizeof(float));}for (int j = 8; j<16; j++){memcpy(&out[i+j], &out2, sizeof(float));}
  • 36.
    Implementation of LPIradio (cont.) Second order oscillator and AMA = 1; B = -Ω2 * dtd(x+t) = dx+dv*dt;d(v+t) = A*dv + B*dx;dvdx
  • 37.
    Implementation of LPIradio (cont.) Sample source code // for different items on the streamsfor (inti = 0; i < noutput_items; i++){float *out = (float *) output_items[0]; float temp_sum = 0.0; //clean temp_sum for next item processingfor (unsigned int m=0; m < d_ncutoff; m++) // processing on different streams{const float *in = (float *) input_items[m]; d_sine[m].d_X = d_sine[m].d_X + d_sine[m].d_V*d_t;d_sine[m].d_V = d_sine[m].d_A*d_sine[m].d_V + d_sine[m].d_B*d_sine[m].d_X;temp_sum += d_sine[m].d_X*in[i]; // Amplitude Modulation Here} memcpy(&out[i], &temp_sum, sizeof(float)); // end of per item processing}
  • 38.
    Implementation of LPIradio (cont.) USRP sink configuration#settings of USRPself.dac_rate = self.u.dac_rate() ## 128MS/sself.u.set_interp_rate(usrp_interp) ## Set interpolation ratetx_subdev_spec = usrp.pick_tx_subdevice(self.u) ## Locate daughter board(s)m = usrp.determine_tx_mux_value(self.u, tx_subdev_spec) ## Auto MUX setupself.u.set_mux(m)self.subdev = usrp.selected_subdev(self.u, tx_subdev_spec) ## Instantiate the daughter board## Tune to RF band: 2.45GHz support by RFX2400. import from command line optionself.u.tune(self.subdev.which(), self.subdev, target_freq) self.subdev.set_enable(True) ## Enable transmit
  • 39.
    Implementation of LPIradio (cont.) Postmodulation at baseband
  • 40.
    Implementation of LPIradio (cont.) Signals in the real world
  • 41.
  • 42.
  • 43.
    A tutorial forGNU radio Python programming
  • 44.
  • 45.
  • 46.
  • 47.
    GNU Radio MailingList Archives
  • 48.
  • 49.
    CGRAN: 3rd PartyGNU Radio Apps
  • 50.
  • 51.
  • 52.
  • 53.
    Thank You!