RF Multi Channel

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Convert Recorded Binary Data to Scaled, Floating Point Voltage Values

One question that has come up with respect to the RF Multi-Channel software has to do with the binary data saved as part of a Record process.

The binary data that is saved when recording with the RF analyzers uses the following format:

  • I and Q samples are saved to disk as alternating I and Q values. So the values saved would look like I0, Q0, I1, Q1, I2, Q2, etc...
  • Each binary I sample and each binary Q sample is represented by a two byte I16 value.
  • The binary data file is saved using Little Endian format.
  • The digitizer used as part of the PXIe-5663, PXIe-5663E, PXIe-5665 (3.6 GHz), and PXIe-5665 (14 GHz) analyzers is the PXIe-5622 16 bit IF digitizer.
    • This is why the data is saved as 16 bits for I and 16 bits for Q
  • Extrapolating on this, each full IQ sample is represented by 4 bytes of data in the binary file - 2 bytes for I and 2 bytes for Q.

In order to convert the binary samples from the data file back to scaled voltage values, we must know the analyzer gain value. In normal analyzer operation, the binary values fetched from the analyzer ADCs are converted to floating point voltage data automatically by NI-RFSA ('under the hood') using this gain value. We must perform this process manually.

The RF Multi-Channel software saves this gain value for each channel into the XML metadata file indirectly, as the RFSG Playback Level. We can use this value from the XML data file and convert it back to the analyzer gain value for offline analysis purposes with some simple math.

Atached is a simple example demonstrating how to convert binary data to floating point data using the saved XML metadata values that are saved during the Record process. In addition, this example saves the IQ data to an Excel (.xls) file.

0 Kudos
Message 1 of 1
(6,331 Views)