Your SlideShare is downloading. ×
0
GNU Radio
GNU Radio
GNU Radio
GNU Radio
GNU Radio
GNU Radio
GNU Radio
GNU Radio
GNU Radio
GNU Radio
GNU Radio
GNU Radio
GNU Radio
GNU Radio
GNU Radio
GNU Radio
GNU Radio
GNU Radio
GNU Radio
GNU Radio
GNU Radio
GNU Radio
GNU Radio
GNU Radio
GNU Radio
GNU Radio
GNU Radio
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

GNU Radio

3,885

Published on

My GNU radio project

My GNU radio project

0 Comments
10 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
3,885
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
0
Comments
0
Likes
10
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. GNU Radio Exploring <br />An implementation of LPI radio<br />Yuan Wang<br />yuwang@ucsd.edu<br />09/17/2009<br />
  • 2. Agenda<br /><ul><li>A shortcut to GNU Radio
  • 3. Hardware Platform - USRP
  • 4. DSP Design Flow of GNU radio
  • 5. Write your own blocks
  • 6. Implementation of LPI radio transmitter</li></ul>2<br />
  • 7. System Architecture<br />Hardware Frontend<br />USRP<br />Host Computer<br />RF Frontend<br />(Daugtherboard)<br />ADC/DAC and<br />Digital Frontend<br />(Mothermoard)<br />GNU Radio<br />Software<br />USB<br />2.0<br />Your code goes here !<br />http://mobiledevices.kom.aau.dk/fileadmin/mobiledevices/teaching/software_testing/Gnu_radio_lecture.pdf<br />
  • 8. System Architecture (Cont.)<br />Software Core<br />Keep in mind: <br />GNU radio has provided some useful APIs for DSP purpose<br />What we are interested in is how to use these existing modules that have been provided in GNU radio to communicate between two end systems<br />Host Computer<br />DSP<br />USB<br />Hardware Frontend USRP<br />RX/TXDaughterboard<br />ADC/DAC<br />FPGA<br />USB<br />Interface<br />http://mobiledevices.kom.aau.dk/fileadmin/mobiledevices/teaching/software_testing/Gnu_radio_lecture.pdf<br />
  • 9. A shortcut to GNU Radio<br /><ul><li>USRP (Universal Software Radio Peripheral) Motherboard</li></ul> Up/Down converting, AD/DA converting, USB 2.0 interface<br /> FIR filter<br /><ul><li> Four 64 MS/s 12-bit ADC
  • 10. Four 128 MS/s 14-bit DAC
  • 11. Four DDC with programmable decimation rates
  • 12. Two DUC with programmable interpolation rates
  • 13. High-speed USB 2.0 interface (480 Mb/s)
  • 14. Modular architecture supports wide variety of RF</li></ul>daughterboards<br /><ul><li> Auxiliary analog and digital I/O support complex</li></ul> radio controls such as RSSI and AGC<br />Fully coherent multi-channel systems<br />Picture from www.ettus.com <br />
  • 15. A shortcut to GNU Radio (Cont.)<br /><ul><li>USRP (Universal Software Radio Peripheral) daughterboard</li></ul> Power Amplifier, Antenna, etc. <br />DC to 30 MHz receiver/transmitter<br />1 MHz to 250 MHz receiver/transmitter<br />50 to 860 MHz receiver<br />800 MHz to 2.4 GHz receiver<br />750-1050 MHz transceiver<br />1150-1450 MHz transceiver<br />1.5-2.1 GHz transceiver<br />2.3-2.9 GHz transceiver (RFX2400 Using now)<br />50 MHz to 1 GHz transceiver<br />800 MHz to 2.2 GHz<br />transceiver<br />2.4 GHz and 5 GHz dualband<br />transceiver<br />Picture from www.ettus.com <br />
  • 16. USRP Block Diagram<br />Picture from gnuradio.org <br />
  • 17. AD9862 with DUC (Tx.)<br />Picture from gnuradio.org <br />
  • 18. DDC in FPGA (Rx.)<br />Picture from gnuradio.org <br />
  • 19. GNU Radio Software Core<br /><ul><li>Write signal Processing Block in C++
  • 20. Build signal Flow graph with Python
  • 21. Object Oriented Programming</li></ul>10<br />
  • 22. Base Class of GNU radio block<br /><ul><li>The prototype of GNU radio block</li></ul>1) gr_sync_block()<br />3<br />7<br />10<br />16<br />7<br />9<br />
  • 23. Base Class of GNU radio block<br /><ul><li>The prototype of GNU radio block</li></ul>2) gr_interpolator_block() <br />3<br />7<br />16<br />10<br />10<br />16<br />7<br />9<br />
  • 24. Basics: Data Streams<br /><ul><li>The prototype of GNU radio block</li></ul>1) gr_decimator_block() <br />4<br />4<br />7<br />7<br />10<br />16<br />6<br />9<br />9<br />6<br />
  • 25. GNU Radio Companion (GUI)<br />
  • 26. Build the DSP flow graph <br />V2<br />#!/usr/bin/env python<br />from gnuradio import gr<br />from gnuradio import audio<br />def build_graph ():<br />sampling_freq = 48000<br />ampl = 0.1<br />fg = gr.flow_graph ()<br /> src0 = gr.sig_source_f (sampling_freq, gr.GR_SIN_WAVE, 350, ampl)<br /> src1 = gr.sig_source_f (sampling_freq, gr.GR_SIN_WAVE, 440, ampl)<br />dst = audio.sink (sampling_freq)<br />fg.connect ((src0, 0), (dst, 0))<br />fg.connect ((src1, 0), (dst, 1))<br /> return fg<br />if __name__ == &apos;__main__&apos;:<br />fg = build_graph ()<br />fg.start ()<br />raw_input (&apos;Press Enter to quit: &apos;)<br />fg.stop ()<br />C++<br />C++<br />C++<br />V1<br />My API<br />APIs<br />V2<br />C++<br />C++<br />C++<br />V1<br />My API<br />Python Flow graph<br />
  • 27. Advanced Topic: Write your own blocks<br /><ul><li>Every block(everything) is a C++ class typically derived from gr_block or its derived class.
  • 28. Three components</li></ul>1. calit2_manchester_ff.h:<br /> Block statement<br />2. calit2_manchester_ff.cc: <br /> Block implementation<br />3. calit2.i: SWIG interface<br />4. Other stuffs: Makefile.am, Makefile.swig.gen, testbench<br />PythonApplication developmentFlow graph construction<br />C++Signal processing blocks<br />Scheduler<br />Control flow graph<br />
  • 29. GNU Radio Developing<br /><ul><li>Opensource software
  • 30. Existing Projects: 802.11b, UCLA Zigbee, ATSC (HDTV), OFDM, DBPSK, DQPSK
  • 31. CGRAN (Comprehensive GNU Radio Archive Network)
  • 32. Features
  • 33. Extensive library of signal processing blocks(C++)
  • 34. Python environment for composing blocks (i.e. DSP flow graph)</li></li></ul><li>Implementaion of LPI radio <br />Block Diagram<br />Audio Source<br />Packed to Unpacked<br />*32767<br />Float to short<br />0.32756<br />short<br />0x3E01<br />1,0,0,1,1,0,1<br />Chunks to symbols<br />Amplitude Modulation on different<br />sub-carriers.<br />1,-1,-1,1,1,-1,1<br />USRP<br />Interleave to N streams<br />SUM<br />Manchester Encoding<br />…<br />To hardware <br />USRP board<br />
  • 35. Implementation of LPI radio (cont.) <br />Manchester Encoder<br />+1<br />-1<br />1<br />0<br />0<br />1<br />if(in[i/16] &gt; 0.0) {out1 = 1.0;out2 = 0.0;}<br />else {out1 = 0.0;out2 = 1.0;}<br />//create manchester output and upsample by 8<br />for(int j = 0; j&lt;8; j++){memcpy(&out[i+j], &out1, sizeof(float));}<br />for (int j = 8; j&lt;16; j++){memcpy(&out[i+j], &out2, sizeof(float));}<br />
  • 36. Implementation of LPI radio (cont.) <br />Second order oscillator and AM<br />A = 1; B = -Ω2 * dt<br />d(x+t) = dx+dv*dt;d(v+t) = A*dv + B*dx;<br />dv<br />dx<br />
  • 37. Implementation of LPI radio (cont.) <br />Sample source code<br /> // for different items on the streams<br />for (inti = 0; i &lt; noutput_items; i++)<br />{<br />float *out = (float *) output_items[0]; <br />float temp_sum = 0.0; //clean temp_sum for next item processing<br />for (unsigned int m=0; m &lt; d_ncutoff; m++) // processing on different streams<br />{<br />const float *in = (float *) input_items[m]; <br />d_sine[m].d_X = d_sine[m].d_X + d_sine[m].d_V*d_t;<br />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;<br />temp_sum += d_sine[m].d_X*in[i]; // Amplitude Modulation Here<br />} <br />memcpy(&out[i], &temp_sum, sizeof(float)); <br />// end of per item processing<br />}<br />
  • 38. Implementation of LPI radio (cont.) <br /> USRP sink configuration<br />#settings of USRP<br />self.dac_rate = self.u.dac_rate() ## 128MS/s<br />self.u.set_interp_rate(usrp_interp) ## Set interpolation rate<br />tx_subdev_spec = usrp.pick_tx_subdevice(self.u) ## Locate daughter board(s)<br />m = usrp.determine_tx_mux_value(self.u, tx_subdev_spec) ## Auto MUX setup<br />self.u.set_mux(m)<br />self.subdev = usrp.selected_subdev(self.u, tx_subdev_spec) ## Instantiate the daughter board<br />## Tune to RF band: 2.45GHz support by RFX2400. import from command line option<br />self.u.tune(self.subdev.which(), self.subdev, target_freq) <br />self.subdev.set_enable(True) ## Enable transmit<br />
  • 39. Implementation of LPI radio (cont.) <br />Postmodulation at baseband<br />
  • 40. Implementation of LPI radio (cont.) <br />Signals in the real world<br />
  • 41. Useful Links<br /><ul><li>Homepage (download, more links, etc)
  • 42. http://gnuradio.org/trac/
  • 43. A tutorial for GNU radio Python programming
  • 44. http://gnuradio.org/trac/wiki/Tutorials/WritePythonApplications
  • 45. Available Signal Processing Blocks
  • 46. http://gnuradio.org/doc/doxygen/hierarchy.html
  • 47. GNU Radio Mailing List Archives
  • 48. http://www.gnu.org/software/gnuradio/mailinglists.html
  • 49. CGRAN: 3rd Party GNU Radio Apps
  • 50. https://www.cgran.org/
  • 51. OFDM Implementation Presentation
  • 52. http://gnuradio.org/trac/wiki/Wireless</li></li></ul><li> QA<br />Questions & Answers<br />
  • 53. Thank You!<br />

×