Docsity

UIUC ECE 463 Digital Communication Laboratory: USRP Transmitter and Receiver Setup, Exams of Economics

Toggle sidebar
bg1
UIUC ECE 463 Digital Communication Laboratory Fall 2018
1
ECE 463 Lab 2: Introduction to USRP
1. Introduction
Following a common software-defined radio architecture, NI USRP hardware implements a direct
conversion analog front end with high-speed analog-to-digital converters (ADCs) and digital-to-analog converters
(DACs) featuring an FPGA for the digital down-conversion (DDC) and digital up-conversion (DUC). The receiver
chain begins with a highly sensitive analog front end capable of receiving very small signals and digitizing them
using direct down-conversion to in-phase (I) and quadrature (Q) baseband signals. Down-conversion is followed
by high-speed analog-to-digital conversion and a DDC that reduces the sampling rate and packetizes I and Q for
transmission to a host computer for further processing. The transmitter chain starts with the host computer where I
and Q are generated and transferred over the Ethernet cable to the NI USRP hardware. A DUC prepares the signals
for the DAC after which I-Q mixing occurs to directly upconvert the signals to produce an RF frequency signal,
which is then amplified and transmitted.
1.1. Contents
1. Introduction
2. USRP Transmitter
3. USRP Receiver
1.2. Report
Submit the answers, figures and the discussions on all the questions. The report is due as a hard copy at the
beginning of the next lab.
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download UIUC ECE 463 Digital Communication Laboratory: USRP Transmitter and Receiver Setup and more Exams Economics in PDF only on Docsity!

ECE 463 Lab 2 : Introduction to USRP

1. Introduction

Following a common software-defined radio architecture, NI USRP hardware implements a direct conversion analog front end with high-speed analog-to-digital converters (ADCs) and digital-to-analog converters (DACs) featuring an FPGA for the digital down-conversion (DDC) and digital up-conversion (DUC). The receiver chain begins with a highly sensitive analog front end capable of receiving very small signals and digitizing them using direct down-conversion to in-phase (I) and quadrature (Q) baseband signals. Down-conversion is followed by high-speed analog-to-digital conversion and a DDC that reduces the sampling rate and packetizes I and Q for transmission to a host computer for further processing. The transmitter chain starts with the host computer where I and Q are generated and transferred over the Ethernet cable to the NI USRP hardware. A DUC prepares the signals for the DAC after which I-Q mixing occurs to directly upconvert the signals to produce an RF frequency signal, which is then amplified and transmitted.

1.1. Contents

1. Introduction

2. USRP Transmitter

3. USRP Receiver

1.2. Report

Submit the answers, figures and the discussions on all the questions. The report is due as a hard copy at the beginning of the next lab.

2. USRP Transmitter 2.1. Transmitter Overview LabVIEW can interact with the USRP transmitter by the blocks under Hardware Interfaces®NI-USRP®Tx. The following diagram shows the basic setup for the USRP transmitter. We will start by building the below diagram and add/modify more functions/algorithms in the rest lab sessions.

The diagram has the following main components:

  • Open Tx Session : Opens a transmit (Tx) session to the device you specify in the device names input and returns session handle as output. You must add a control called “device names” that you will use to inform LabVIEW of the IP address or resource name of the USRP.
  • Configure Signal : Configures parameters of Tx or Rx. IQ rate is the sampling rate of the baseband I/Q data in samples per second (S/s). Carrier frequency is the carrier frequency of the RF signal in Hz. Gain is the Tx gain applied to the RF signal in dB. Active antenna is the antenna port to use for this channel. Coerced IQ rate/carrier frequency/gain are the actual corresponding values supported by the device.
  • Write Tx data : writes complex, 16-bit signed integer data to the specified channel. The baseband samples to transmit as an array of complex, 16-bit signed integer data. The real and imaginary components of the data correspond to the in-phase (I) and quadrature-phase (Q) data, respectively. I and Q are interleaved [I, Q, I, Q, ...] in the array.
  • Close Session : Closes the session handle to the device.
  1. As described in the introduction, the USRP Tx/Rx is a quadrature modulation system. It mixes the in- phase (I) signal with the cosine wave (whose frequency is the “carrier frequency”) and the quadrature- phase (Q) signal with the sine wave. The Write Tx Data block takes the IQ baseband-samples and modulates them with the two sinusoids. Note that the input data of the Write Tx Data block can have various different types. We’ll use the complex double (CDB) array. Click the block and change the function configuration to Write Tx Data ( CDB). The real and imaginary parts of this complex data array correspond to the in-phase (I) and quadrature-phase (Q) data, respectively.
  2. We will now generate a single sinusoid signal at the carrier frequency. To do that, we will input a constant number of array for the baseband-samples. Use “Initialize Array” block. The diagram will look like as the following figure.
  3. Set the parameters as follows: o IQ rate = 1M o Carrier frequency = 2G o Gain = 0 o Active antenna = TX o Waveform size = 1000
  4. Connect the TX1 output port to the spectrum analyzer using SMA cables and a 2 0dB attenuator. Verify that a right signal is generated.
  5. Change the carrier frequency to 1G, 2.5G, 3G, 4G, 5G, … and verify that you see the correct frequency on the spectrum analyzer.

2.3. Transmitting Sinusoidal Signal We will now generate a sinusoidal signal with a frequency offset to the carrier frequency and transmit it. Instead of the constant data, we will feed a cosine waveform to in-phase data and a sine waveform to quadrature-phase data.

  1. Duplicate the VI and rename as “upper-side_IQ.gvi”. Remove the Initialize Array, its numeric constant and the wire to the Write Tx Data.
  2. Create two more double-type controls: Tone frequency and Tone amplitude.
  3. Place two “Wave Generator” blocks from Analysis®Signal Processing®Generation. By default, the block is “Sine” wave and “Waveform” data type.
  4. Wire the Tone frequency control to the Frequency port of the two Wave Generator blocks and the Tone amplitude control to the Amplitude port. Wire the Waveform size control to the Samples port. Wire the Sample rate port to the Coerced IQ rate indicator.
  5. Create a numeric constant of “90” and wire it to the “Phase in” port of one of the Wave Generator blocks.
  6. Use “Waveform Properties” to get the cosine and sine samples from the Wave Generator blocks.
  7. Use “Real and Imaginary to Complex” to receive the cosine and sine samples and convert them to complex numbers. You should get the below diagram.
  8. Set the parameters as follows: o IQ rate = 1M o Carrier frequency = 2G o Gain = 0 o Active antenna = TX o Waveform size = 1000 o Tone frequency = 1k o Tone amplitude = 1
  9. Connect the TX1 output port to the spectrum analyzer using SMA cables and a 2 0dB attenuator. Verify that a right signal is generated.
  10. Change the tone frequency to 10k, 50k, 100k, and verify that the correct tone appears on the spectrum analyzer.

3. USRP Receiver 3.1. Receiver Overview LabVIEW can interact with the USRP receiver by the blocks under Hardware Interfaces®NI-USRP®Rx. The following diagram shows the basic setup for the USRP receiver. We will start from this diagram and add/modify more functions/algorithms in the rest lab sessions. - Open Rx Session : Opens a reciver (Rx) session to the device you specify in the device names input and returns session handle out. You must add a control called “device names” that you will use to inform LabVIEW of the IP address or resource name of the USRP. - Initiate : Starts the Rx acquisition. - Fetch Rx Data : Fetches complex, 16-bit signed integer data from the specified channel. Number of samples defined the samples to fetch from the acquisition channel. Data is the received baseband samples as an array of complex, 1 6 - bit signed integer data. The real and imaginary components of the data correspond to the in-phase (I) and quadrature-phase (Q) data, respectively. I and Q are interleaved [I, Q, I, Q, ...] in the array. The total number of elements returned in the array equals the value of the number of samples parameter x 2. - Abort : Stops an acquisition previously started.

3.2. Construct the USRP Receiver We will start by building the above receiver diagram.

  1. Open a blank VI and rename as “Rx.gvi”.
  2. Place Open Rx Session , Configure Signal , Initiate, Fetch Rx Data , Abort and Close Session. Similar to Tx, create the controls and indicators for IQ rate, carrier frequency, gain, and active antenna. Input “1” for the enabled channel. This will enable “RF1” channel in the front panel of the USRP. Create a while loop for Fetch Rx Data. Click the Fetch Rx Data. Change its Function Configuration to Fetch Rx Data (CDB WDT). The diagram will look like as the following figure. Rename the new vi as “rx_template.gvi”. We will re-use the vi in the next following labs, so keep it. Go back to “Rx.gvi”.
  3. In Rx, we want to display the spectrum of the received signal just like the spectrum analyzer. We also want to display the in-phase signal and the quadrature-phase signal in the time domain.
  4. Place “FFT Power Spectrum and PSD” block from Analysis®Signal Processing®Measurement. Change its Function Configurations to “Power Spectrum” and “Continuous”. Check “dB on” to display in dB scale. Wire the data port of Fetch Rx Data to the signal port. To display the spectrum, go to the panel and create Graph from “Graphs and Charts”. Go back to the diagram and connect the graph indicator to the power spectrum port.
  5. Create Waveform Properties for the data port of Fetch Rx Data. Use “Complex to Real and Imaginary” to extract I and Q samples from the complex array. Use Build Waveform blocks and Waveform indicators to display the IQ time domain samples.