Skip to content

Manually adjusting DC offset and IQ Imbalance corrections

Jon Szymaniak edited this page Mar 14, 2014 · 8 revisions

This page describes how to use the bladeRF's built-in DC offset and IQ imbalance corrections.

Table of Contents

Overview

Direct conversion (homodyne or zero-IF) receivers have become very popular recently especially in the realm of software defined radio. There are many benefits to direct conversion receivers, but there are also some serious drawbacks the largest being DC offset and IQ imbalances.

DC offset manifests itself as a large spike in the center of the spectrum. This happens in direct conversion receivers due to a few different factors. One is at the ADC where being off by a single LSB will yield a DC offset. Another is at the output of the low-pass filters where any DC bias will propagate through. The last is at the mixer where the local oscillator (LO) being on the center of the desired frequency will leak through to the receiver.

IQ imbalances occur due to the slightest mismatches in sections of the receiver chain when dealing with the I and Q signal paths. The LO is generated and then delayed by 90 degrees. When mixed with the original signal, this produces the I signal whereas the Q signal is generated by mixing with the LO that is delayed by 90 degrees. In the analog domain, it is much harder to guarantee the delay is exactly 90 degrees. Similarly, the gain component is a slight mismatch in overall gain for each of the signal paths.

To make matters worse, these impairments need to be corrected for over both frequency and temperature.

For further information, check out the following:

The LMS6002D transceiver provides DC offset cancellation, and the bladeRF HDL implements IQ imbalance corrections. Correction values for these can be manually specified via libbladeRF's bladerf_set_correction() function.

Tuning the TX module

Below is am image showing a spectrum containing a tone before (left) and after (right) manually adjusting the DC offset and IQ imbalance correction parameters.

Using a spectrum analyzer and osmocom_siggen

  1. Ensure the bladeRF's FPGA is loaded
  2. Run osmocom_siggen for the desired frequency:
osmocom_siggen -s 4M -f 450M --sine
  1. Specify a frequency offset for the sinusoid
With an uncalibrated device, you'll generally see the following a spectrum plot:
  1. A spike at DC
  2. An image of the tone at -F Hz

DC offset correction

  1. Move the DC Offset Correction Real slider until the amplitude DC spike reaches a minimum
  2. Move the DC Offset Correction Imag slider to further reduce the DC spike
  3. Repeat until the DC spike is sufficiently canceled
  4. Record these settings for reference as an initial starting point in the future.

IQ imbalance correction

  1. Move the IQ Imbalance Correction Mag slider until the amplitude of the image reaches a minimum
  2. Move the IQ Imbalance Phase slider to further reduce the amplitude of the image
  3. Repeat until the image spike is sufficiently canceled
  4. Record these settings for reference as an initial starting point in the future.
Note that you many need to re-tune the DC offset or IQ imbalance slightly after fine tuning other.

Tuning the RX module

Using GNU Radio and the bladeRF's RF loopback functionality

The RX-side can be tuned in a manner similar to what's described above for the TX procedure.

The basic procedure is to:

  • Enable RF loopback mode (via rf_lna1 for < 1.5GHz, or rf_lna2 for >= 1.5GHz)
  • RX at some frequency f
  • Transmit a carrier at some frequency f + offset
  • View the received signal on an FFT plot
    • Adjust the DC offset parameters to reduce the spike at DC
    • Adjust the IQ imbalance parameters to reduce the image of the carrier from the TX side
An example GNU Radio script is provided here.

Using osmocom_fft and a signal generator

TO DO

Clone this wiki locally