1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-23 10:05:46 -05:00
sdrangel/plugins/samplemimo/xtrxmimo/readme.md
2020-11-11 09:53:56 +01:00

11 KiB

XTRX MIMO plugin

Introduction

This MIMO plugin sends and receives its samples to/from a XTRX device. It handles both input (Rx) and output (Tx) streams synchronously. There is no option to synchronize Rx with Tx streams.

⚠ There are USB errors when first starting with XTRX after plugging it in. The only way to work around this is to restart SDRangel application.

⚠ Reception may stall sometimes particularly with sample rates lower than 5 MS/s and also after changes. You may need to stop and restart the device (stop/start button) to recover.

⚠ Right after (re)start you may need to move the main frequency dial back and forth if you notice that you are not on the right frequency.

⚠ Simultaneous Rx and Tx is not supported. Dual Tx is not working either.

Build

The plugin will be built only if XTRX support libraries are installed in your system.

If libraries are installed in a custom place like /opt/install/xtrx-images add the following defines on cmake command line:

-DXTRX_DIR=/opt/install/xtrx-images

Real time scheduling

You may find in the log some info (green) messages from libxtrx mentioning that some task cannot be set with real time priority. While this is not an absolute necessity to make XTRX work you may want to allow your user or a specific group your user belongs to to set tasks with real time scheduling.

In most Linux systems this is done by editing the /etc/security/limits.conf file (with sudo rights). In this file you may add these lines for your user (ex: user):

user             -       rtprio          99
user             -       memlock         unlimited

For a group the syntax is the same but the group name is prefixed with @ like:

@realtime        -       rtprio          99
@realtime        -       memlock         unlimited

Interface

XTRX MIMO plugin GUI

1. Rx/Tx settings selection

Use this combo to target UI to Rx or Tx streams for Rx/Tx specific items.

2. Stream settings selection

Use this combo to target UI to stream 0 or stream 1 for stream specific items.

3. Rx/Tx spectrum display selection

Use this combo to select Rx or Tx side for main spectrum display.

4. Stream spectrum display selection

Use this combo to select stream 0 or stream 1 for main spectrum display.

5. Start/Stop Rx

This button controls the start/stop of the Rx subsystem.

6. Start/Stop Tx

This button controls the start/stop of the Tx subsystem.

7. Record button

  • Left click: record baseband I/Q stream toggle button (inactive: waiting for synchronous streams recording)
  • Right click: choose record file

8. Center frequency

This controls the center frequency of Rx or Tx subsystems in kHz depending on the Rx/Tx settings selection (1). This frequency can effectively be different for Rx and Tx but is the same for both Rx or both Tx streams.

9. ADC/DAC sample rate

This is the sample rate at which the ADC or DAC runs in kS/s (k) or MS/s (M) before hardware decimation or after hardware interpolation. Thus this is the device to host sample rate (A.7) multiplied by the hardware decimation or interpolation factor (A.8).

10. Baseband sample rate

In device to host sample rate input mode (A.6) this is the baseband I/Q sample rate in kS/s. This is the device to host sample rate (A.7) divided by the software decimation or interpolation factor (A.9).

In baseband sample rate input mode (A.6) this is the device to host sample rate in kS/s. This is the baseband sample rate (A.7) multiplied by the software decimation or interpolation factor (A.9)

A. Section

XTRX MIMO A section plugin GUI

A.1. NCO toggle

The button is lit when NCO is active and dark when inactive.

Use this button to activate/deactivate the TSP NCO. The LMS7002M chip has an independent NCO in each Rx channel that can span the bandwidth received by the ADC. This effectively allows non zero digital IF.

A.2. NCO frequency shift

This is the frequency shift applied when the NCO is engaged thus the actual LO frequency is the center frequency of reception minus this value. Use the thumbwheels to adjust frequency as done with the LO (8). Pressing shift simultaneously moves digit by 5 and pressing control moves it by 2. The boundaries are dynamically calculated from the LO center frequency, sample rate and hardware decimation factor.

☞ Engaging the NCO shifts the center frequency of reception or transmission by the shift amount. You have to retune the center frequency (8) to get back to the frequency before the NCO was engaged. You may also select the NCO frequency and then tune the center frequency.

☞ In the LMS7002M TSP Rx block the NCO sits before the decimator (see Fig.14 of the datasheet p.7) so it runs at the actual ADC rate. Hence the NCO limits are calculated as +/- half the device to host sample rate multiplied by the hardware decimation factor. For example with a 4 MS/s device to host sample rate (A.7) and a hardware decimation of 16 (A.8) you have +/- 32 MHz span around the LO for the NCO. In this example you can tune all HF frequencies with the center frequency set at its lowest (30 MHz).

A similar logic is used on the Tx / DAC side.

A.3. DC auto correction options

This button controls the local DSP DC auto remove DC component.

A.4. IQ auto correction options

This button controls the local DSP auto make I/Q balance. The DC correction must be enabled for this to be effective.

A.5. External clock control

Use this button to open a dialog that lets you choose the external clock frequency and enable or disable it. When disabled the internal 30.72 MHz VCTCXO is used.

LimeSDR input plugin gain GUI

A.5.1. External clock frequency

Can be varied from 5 to 300 MHz

Use the thumbwheels to adjust frequency as done with the LO (1.1). Pressing shift simultaneously moves digit by 5 and pressing control moves it by 2. The boundaries are dynamically calculated from the LO center frequency, sample rate and hardware decimation factor.

A.5.2. Enable/disable external clock input

Use this checkbox to enable or disable the external clock input

A.5.3. Confirm changes

Use the "OK" button to confirm your changes

A.5.4. Dismiss changes

Use the "Cancel" button to dismiss your changes

A.6. Device to host sample rate / Baseband sample rate input toggle

Use this toggle button to switch the sample rate input next (A.7) between device to host sample rate and baseband sample rate input. The button shows the current mode:

  • SR: device to host sample rate input mode. The baseband sample rate (10) is the device to host sample rate (A.7) divided by the software decimation or interpolation factor (A.9).
  • BB: baseband sample rate input mode. The device to host sample rate (A.7) is the baseband sample rate (10) multiplied by the software decimation or interpolation factor (A.9).

A.7. Sample rate

This is the LMS7002M device to/from host stream sample rate or baseband sample rate in samples per second (S/s). The control (A.6) is used to switch between the two input modes. The device to/from host stream sample rate is the same for the Rx and Tx systems.

The limits are adjusted automatically. In baseband input mode the limits are driven by the decimation or intepolation factor (A.9). You may need to increase this factor to be able to reach lower values.

Use the wheels to adjust the sample rate. Pressing shift simultaneously moves digit by 5 and pressing control moves it by 2. Left click on a digit sets the cursor position at this digit. Right click on a digit sets all digits on the right to zero. This effectively floors value at the digit position. Wheels are moved with the mousewheel while pointing at the wheel or by selecting the wheel with the left mouse click and using the keyboard arrows.

The LMS7002M uses the same clock for both the ADCs and DACs therefore this sample rate affects all of the 2x2 MIMO channels.

A.8. Hardware decimation or interpolation factor

The TSP block in the LMS7002M hardware has a decimation/interpolation chain that acts on both Rx/Tx channels and therefore can achieve decimation/interpolation between 1 (no decimation/interpolation) and 64 in increasing powers of 2: 1, 2, 4, 8, 16, 32, 64. However the position "1" (no decimation/interpolation) is replaced by an automatic decimation/interpolation.

A.9. Software decimation or interpolation factor

The I/Q stream from the LimeSDR is downsampled/upsampled by a power of two by software inside the plugin before being sent to the passband/device. Possible values are increasing powers of two: 1 (no decimation/interpolation), 2, 4, 8, 16, 32.

B. section

XTRX MIMO B section plugin GUI

B.1. Analog filter bandwidth

This is the hardware filter bandwidth in kHz in the LMS7002M device for the given channel. Boundaries are updated automatically. Use the wheels to adjust the value. Pressing shift simultaneously moves digit by 5 and pressing control moves it by 2.

B.2. Power mode

XTRX power mode

B.3. Gain mode

This is the gain mode control that applies to Rx only:

  • automatic: AGC based on a global gain (B.4)
  • manual: Manual. Use LNA, TIA and PGA controls (B.5 to B.7) to adjust gain

B.4. Manual gain setting

  • Rx: this sets the gain manually per stream if (B.3) is set to "Manual".
  • Tx: this sets the gain

B.5. LNA gain

Rx only. This is the LNA gain stage in dB

B.6. TIA gain

Rx only. This is the TIA gain block settings in 3 increasing stages.

B.7. PGA gain

Rx only. This is the PGA gain stage in dB

A.8. Antenna path select

Rx side

Use this combo box to select the input path (network):

  • Lo: Selects the low frequency input. You should use this one and this is the default
  • Wide: Selects the wide band frequency input. This is not connected and should not be used
  • Hi: Selects the high frequency input. You may use this one as well with no actual difference with "Lo".
Tx side

Use this combo box to select the output path (network):

  • Hi: Tx high range
  • Wi: Tx wide range: you should use this one (default)

11. Stream status indicator

This label turns green when status can be obtained from the current stream. Usually this means that the stream is up and running but not necessarily streaming data. The various status elements appear next on the same line (13)

12. GPS status

This label turns green when the GPS used for the GPSDO is locked.

13. Rx FIFO status

This is the fill percentage of the Rx FIFO in the XTRX interface. It should be zero most of the time.

14. Tx FIFO status

This is the fill percentage of the Tx FIFO in the XTRX interface. It should be near 100% most of the time.

15. Board temperature

This is the board temperature in degrees Celsius updated every ~5s. Before the first probe the display marks "00C" this is normal.