In this series:

OFDM reference design: Moving into cognitive mode – Part 2

Nutaq recently posted a video showing the OFDM reference design in action. In this video, continuous transmission is assured even in the presence of interference. However, the video doesn’t explain how this was achieved. Basically, it’s the same concept as the Automatic Control Algorithm (AGC) (http://nutaq.com/en/blog/fpga-based-agc-algorithm-using-system-generator). The AGC calculates the mean received power and issues a command to the receive chain, requesting it to adjust the gain in order to achieve a better signal-to-noise ratio (SNR) or to avoid saturation of the next packet. In cognitive mode, the mean received power calculator is free-running, so it also becomes a mean noise power calculator when there is no transmission. With this calculator, we can detect if the channel is occupied or not, based simply on an energy detection criterion.

The following steps are made before transmitting a packet:

  • The radio is initially configured at 453 MHz.
  • Once the packet is generated by the transmitter and ready for transmission, the receiver stores the mean value of the noise at the currently configured frequency.
  • The mean power of the noise is compared to a fixed threshold:
    • If the value is higher than the fixed threshold, the transmitting frequency is changed to 433 MHz,
    • Otherwise, the transmit frequency isn’t changed.
  • The packet is then transmitted over the air.

The algorithm is pretty simple but it still enables us to implement a simple cognitive application based on energy detection. The most interesting thing in this simple proof of concept isn’t the implemented sensing algorithm itself but how we dynamically reconfigure the radio to avoid the interference.

In the video, a PicoSDR 2×2 system with two FMC Radio420X cards on top of a Virtex-6 FPGA is used. The Radio420X cards are based around the LMS6002D RFIC from Lime Microsystems. This RFIC includes everything required to take a digital baseband I/Q signal and send it over the air (vice-versa for reception). The RFIC is easily controllable through a bunch of registers accessible via the SPI protocol. Nutaq not only provides the high-level functions needed to control the RFIC from an external computer through an Ethernet cable but also enables the SPI protocol to be driven directly from the FPGA, which reduces latency to a minimum.

Let’s see how we can control the RFIC to change the TX/RX frequency to 433 MHz. From the LMS6002 Programming and Calibration Guide on page 30, we find that we need to write specific values to specific registers in order to reconfigure the TX and RX PLLs:

Register Name

Register Address (TX, RX)

Register value (TX, RX)

FREQSEL

0x15, 0x25

0xFD, 0xFD

NINT

[8:1]

0x10, 0x20

0x70, 0x70

NINT[0] & NFRAC[22:16]

0x11, 0x21

0xC2, 0xC2

NFRAC[15:8]

0x12, 0x22

0xAA, 0xAA

NFRAC[7:0]

0x13, 0x23

0xAA, 0xAA

XX & VCOCAP[5:0]

0x19, 0x29

0xA4, 0xA4

To find the register values that you need to write, follow the tutorial on page 27. If you directly configure the radio at 433 MHz by using the CLI commands, take note of these register values by using the following CLI command: fmcradio_limespi_read [register_address]. The registers 0x19 and 0x29 are the most important to look at since they provide the correct capacitance of the VCOCAP for proper PLL locking.

In the second part of this series, we’ll see how we can write the values to their specific registers directly from the FPGA.

 

An OFDM reference design built to support cognitive radio