Uploaded on

My GNU radio project

My GNU radio project

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
3,526
On Slideshare
0
From Embeds
0
Number of Embeds
2

Actions

Shares
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
    An implementation of LPI radio
    Yuan Wang
    yuwang@ucsd.edu
    09/17/2009
  • 2. Agenda
    • 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
    2
  • 7. System Architecture
    Hardware Frontend
    USRP
    Host Computer
    RF Frontend
    (Daugtherboard)
    ADC/DAC and
    Digital Frontend
    (Mothermoard)
    GNU Radio
    Software
    USB
    2.0
    Your code goes here !
    http://mobiledevices.kom.aau.dk/fileadmin/mobiledevices/teaching/software_testing/Gnu_radio_lecture.pdf
  • 8. System Architecture (Cont.)
    Software Core
    Keep in mind:
    GNU radio has provided some useful APIs for DSP purpose
    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
    Host Computer
    DSP
    USB
    Hardware Frontend USRP
    RX/TXDaughterboard
    ADC/DAC
    FPGA
    USB
    Interface
    http://mobiledevices.kom.aau.dk/fileadmin/mobiledevices/teaching/software_testing/Gnu_radio_lecture.pdf
  • 9. A shortcut to GNU Radio
    • USRP (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 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
    daughterboards
    • Auxiliary analog and digital I/O support complex
    radio controls such as RSSI and AGC
    Fully coherent multi-channel systems
    Picture from www.ettus.com
  • 15. A shortcut to GNU Radio (Cont.)
    • USRP (Universal Software Radio Peripheral) daughterboard
    Power Amplifier, Antenna, etc.
    DC to 30 MHz receiver/transmitter
    1 MHz to 250 MHz receiver/transmitter
    50 to 860 MHz receiver
    800 MHz to 2.4 GHz receiver
    750-1050 MHz transceiver
    1150-1450 MHz transceiver
    1.5-2.1 GHz transceiver
    2.3-2.9 GHz transceiver (RFX2400 Using now)
    50 MHz to 1 GHz transceiver
    800 MHz to 2.2 GHz
    transceiver
    2.4 GHz and 5 GHz dualband
    transceiver
    Picture from www.ettus.com
  • 16. USRP Block Diagram
    Picture from gnuradio.org
  • 17. AD9862 with DUC (Tx.)
    Picture from gnuradio.org
  • 18. DDC in FPGA (Rx.)
    Picture from gnuradio.org
  • 19. GNU Radio Software Core
    • Write signal Processing Block in C++
    • 20. Build signal Flow graph with Python
    • 21. Object Oriented Programming
    10
  • 22. Base Class of GNU radio block
    • The prototype of GNU radio block
    1) gr_sync_block()
    3
    7
    10
    16
    7
    9
  • 23. Base Class of GNU radio block
    • The prototype of GNU radio block
    2) gr_interpolator_block()
    3
    7
    16
    10
    10
    16
    7
    9
  • 24. Basics: Data Streams
    • The prototype of GNU radio block
    1) gr_decimator_block()
    4
    4
    7
    7
    10
    16
    6
    9
    9
    6
  • 25. GNU Radio Companion (GUI)
  • 26. Build the DSP flow graph
    V2
    #!/usr/bin/env python
    from gnuradio import gr
    from gnuradio import audio
    def build_graph ():
    sampling_freq = 48000
    ampl = 0.1
    fg = 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 fg
    if __name__ == '__main__':
    fg = build_graph ()
    fg.start ()
    raw_input ('Press Enter to quit: ')
    fg.stop ()
    C++
    C++
    C++
    V1
    My API
    APIs
    V2
    C++
    C++
    C++
    V1
    My API
    Python Flow graph
  • 27. Advanced Topic: Write your own blocks
    • Every block(everything) is a C++ class typically derived from gr_block or its derived class.
    • 28. Three components
    1. calit2_manchester_ff.h:
    Block statement
    2. calit2_manchester_ff.cc:
    Block implementation
    3. calit2.i: SWIG interface
    4. Other stuffs: Makefile.am, Makefile.swig.gen, testbench
    PythonApplication developmentFlow graph construction
    C++Signal processing blocks
    Scheduler
    Control flow graph
  • 29. GNU Radio Developing
    • 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)
  • Implementaion of LPI radio
    Block Diagram
    Audio Source
    Packed to Unpacked
    *32767
    Float to short
    0.32756
    short
    0x3E01
    1,0,0,1,1,0,1
    Chunks to symbols
    Amplitude Modulation on different
    sub-carriers.
    1,-1,-1,1,1,-1,1
    USRP
    Interleave to N streams
    SUM
    Manchester Encoding

    To hardware
    USRP board
  • 35. Implementation of LPI radio (cont.)
    Manchester Encoder
    +1
    -1
    1
    0
    0
    1
    if(in[i/16] > 0.0) {out1 = 1.0;out2 = 0.0;}
    else {out1 = 0.0;out2 = 1.0;}
    //create manchester output and upsample by 8
    for(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 LPI radio (cont.)
    Second order oscillator and AM
    A = 1; B = -Ω2 * dt
    d(x+t) = dx+dv*dt;d(v+t) = A*dv + B*dx;
    dv
    dx
  • 37. Implementation of LPI radio (cont.)
    Sample source code
    // for different items on the streams
    for (inti = 0; i < noutput_items; i++)
    {
    float *out = (float *) output_items[0];
    float temp_sum = 0.0; //clean temp_sum for next item processing
    for (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 LPI radio (cont.)
    USRP sink configuration
    #settings of USRP
    self.dac_rate = self.u.dac_rate() ## 128MS/s
    self.u.set_interp_rate(usrp_interp) ## Set interpolation rate
    tx_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 setup
    self.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 option
    self.u.tune(self.subdev.which(), self.subdev, target_freq)
    self.subdev.set_enable(True) ## Enable transmit
  • 39. Implementation of LPI radio (cont.)
    Postmodulation at baseband
  • 40. Implementation of LPI radio (cont.)
    Signals in the real world
  • 41. Useful Links
    • 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
  • QA
    Questions & Answers
  • 53. Thank You!