Software Defined Radio

cancel
Showing results for 
Search instead for 
Did you mean: 

PSK Phase Shift Demo

Description

A USRP Tx / Rx pair is set up with one USRP receiving a QPSK signal transmitted by the other. A MIMO cable link between the pair shares a common reference clock signal (the same cable allow the two USRPs to share a single Gigabit Ethernet connection).

The example includes a VI to configure the Tx USRP to transmit a repeating QPSK signal.

The Rx USRP includes a separate example VI to configure the Rx USRP to receive at the same sampling rate and center frequency as the Tx USRP. The Rx USRP Example VI also configures the Rx USRP hardware to derive its reference clock from the Tx USRP.  A constellation plot on the front panel displays the received signal.

Although no carrier correction or symbol timing recovery is applied, the Rx constellation plot shows distinct symbol locations with a stable phase offset (the angle rotated about the center). You can move the relative location of Tx / Rx antennas or put your hand between the two to cause the QPSK constellation to rotate. The rotation you see are variations in the relative phase offset between the Transmitter and Receiver due to changes in the distance or medium the transmitted signal undergoes in channel.

The Rx VI includes a MathScript RT node with an .m file script that does some simple inline processing:

  1. Normalizes the acquired signal (so you don't see amplitude variations when you change the channel)
  2. Applies a user-specified phase offset to the normalized signal, enabling you to rotate the signal manually.

SW Requirements

  • LabVIEW 2011 or higher
  • NI USRP 1.0 or higher
  • Modulation Toolkit 3.4

HW Requirements

  • Two NI USRP 292x
  • MIMO cable
  • Antennas

USRP Setup / Connections

USRP Connection Figure.png

Working with the Example

  1. Confirm that your USRP hardware is set up as shown above.
  2. Unzip the zip file associated with this document to a new folder
  3. Open USRP-MathScript.lvproj in LabVIEW. The LabVIEW Project Explorer window should open showing the contents of the USPR-MathScript project.
  4. From the Project Explorer window, double click the entries for the two top-level example VIs to open them:
    1. USRP Rx with MathScript inline.vi
    2. USRP PSK Tx (Silver).vi
  5. Set the parameters on the front panels for these two VIs to values appropriate for your USRP hardware.
    1. IQ Sampling Rate [s/sec] should be set to the same value on both VIs, start with the default of 200k samples / sec.
    2. Set Carrier Frequency [Hz] and Samples Per Symbol to the same value on both VIs. IMPORTANT: It is your responsibility to choose parameters such as Carrier Frequency [Hz] so that you abide by your local regulations and legally transmit / receive. (A carrier in an ISM band is worth considering, see http://en.wikipedia.org/wiki/ISM_band)
    3. On USRP PSK Tx (Silver).vi, set the Reference Frequency Source to Internal. In this mode, the Transmitter will automatically share its internal reference clock over the MIMO cable.
    4. On USRP Rx with MathScript Inline.vi, set the Reference Frequency Source to MIMO. Doing so will configure the Reference clock for the receiver to use the 10-MHz clock  from the other USRP, as supplied through the MIMO cable.
    5. Ensure that the USRP IP Address controls on both VIs correspond to the IP addresses for the USRPs connected to your computer.
  6. Run USRP PSK Tx (Silver).vi
  7. Run USRP Rx with MathScript inline.vi, and watch the Constellation Plot display. You should see something that resembles the plot below, although the constellation may have an arbitrary rotation.
    Rxfigure.png
  8. Change the relative location of the Tx / Rx antennas and note how the constellation rotates around the center.
  9. You can turn the Apply Phase Offset knob to apply an arbitrary phase offset to the acquired signal, to for instance, rotate the constellation back to horizontal / vertical.
  10. Changing the relative location of the Tx / Rx antennas changes the phase of the acquired signal, and this shows up as rotation. Do you also expect the amplitude of the received signal to change?
  11. What are some of the real-world effects that cause the symbol locations to be less distinct (more like snowballs)?
  12. What effect does changing the Carrier Frequency [Hz] have on the received constellation? Hint: Set the Carrier Frequency [Hz] to some value and try increasing / decreasing the distance between the Tx / Rx antennas at a constant rate while watching the constellation as it rotates. Set the Carrier Frequency [Hz] to another value and again try increasing / decreasing the distance between the Tx / Rx antennas at roughly the same constant rate while watching the constellation as it rotates.
  13. The Symbol Rate is determined by the combination of the IQ Sampling Rate [samples / sec] and the Samples / Symbol settings, specifically: Symbol Rate  == (IQ Sampling Rate) / (Samples / Symbol). What effect does changing the Symbol Rate have on the Rx constellation?

Questions / Exercises

  1. Changing the relative location of the Tx / Rx antennas changes the phase of the acquired signal, and this shows up as rotation. Do you also expect the amplitude of the received signal to change?
  2. What are some of the real-world effects that cause the symbol locations to be less distinct (more like snowballs)?
  3. What effect does changing the Carrier Frequency [Hz] have on the received constellation? Hint: Set the Carrier Frequency [Hz] to some value and try increasing / decreasing the distance between the Tx / Rx antennas at a constant rate while watching the constellation as it rotates. Set the Carrier Frequency [Hz] to another value and again try increasing / decreasing the distance between the Tx / Rx antennas at roughly the same constant rate while watching the constellation as it rotates.
  4. The Symbol Rate is determined by the combination of the IQ Sampling Rate [samples / sec] and the Samples / Symbol settings, specifically: Symbol Rate  == (IQ Sampling Rate) / (Samples / Symbol). What effect does changing the Symbol Rate have on the Rx constellation?
Sam Shearman
Comments
sshearman
Member
Member
on

Wow what an example!

Sam Shearman
Contributors