Replaying and Recording Waveform with 6G Sub-THz Waveform Research Examples

Updated Aug 21, 2024

The 6G Sub-THz Waveform Research examples help you replay and record TDMS or MATLAB waveform with data streaming functionality. For users conducting sub-THz 6G waveform research, pairing the third-generation VST PXIe-5842 with the PXIe-7903 high-speed serial instrument will allow for real-time, sustained I/Q data streaming at up to 4 GHz of instantaneous bandwidth to and from the device. You can use this example in 6G Sub-THz waveform research activities. 

Key Features 

  • Replay up to 10 GB TDMS or MAT format waveform through the PXIe-5842 vector signal transceiver (VST) in 5GSamples/second I/Q rate. 

  • Record up to 10 GB TDMS or MAT format acquisition data in 5GSamples/second I/Q rate. 

  • Facilitate a high-throughput system using NI-validated, optimized reference design. 

  • Provide a robust architecture to guarantee RF data collection and storage. 

  • Provide new parameters of frequency ranges, bandwidths to explore 6G waveform generation.


Hardware Overview 

The 6G SubTHz Waveform Research examples are designed for using in a system that includes the following hardware components.  

Hardware components from NI 

Shipping kit PN 

Quantity 

PXIe, 4.1 GHz Quad-Core or 3.9 GHz 8-Core or 3 GHz 18-Core PXI Controller 

787806-0118 

PXIe, 18-Slot (5 Hybrid Slots, 11 PXI Express Slots, 1 PXI Express System Timing Slot) 

785971-01 

VST PXIe-5842 (4GHz BW) 

789379-01 

PXIe-7903 28.2 Gbps, 48-Channel PXI High-Speed Serial Instrument 

788917-01 

Mini-SAS zHD-Mini-SAS zHD HSS Passive Cable, 0.5m 

788927-0R5 

PXIe-5654 50 kHz to 20 GHz, PXI RF Analog Signal Generator 

783127-01 

 

Hardware components from third party 

Quantity 

Up-converter/down-converter: VDI WR6.5CCU-M8/WR6.5CCD-M8 

Mini-Circuits BW-S10W2+ 10 dB attenuator up to 26.5G 

Micro Harmonics FR65M2-057 Isolator, 1.3 dB IL 24 dB isolation Diamond HeatSink Extended BW 

VDI(VIRGINIA DIODES INC) WR6.5BPF152-162 bandpass filter 

VDI(VIRGINIA DIODES INC) WR6.5AMP Amplifier 

20 dB directional coupler: Eravant SWD-2025H-06-SB 

Eravant SWG-06010-FB 1" waveguide section 

 

Note: The reference information in this manual applies only when you use the above hardware components within the 6G SubTHz Waveform Research example. Refer to the documentation of individual instruments for basic information about installation, configuration, and operation of each instrument. 

 

Support for the PXIe-5842 VST 

The 6G SubTHz Waveform Research supports the following PXIe-5842 variants. You can find the PXIe-5842 VST assembly part number in NI Measurement & Automation Explorer (MAX). 

 

PXIe-5842 VST assembly part number 

Max frequency 

Max instantaneous bandwidth 

135077x–40L 

where x is hardware revision B or later 

23 GHz 

4 GHz 

135077x–01L 

where x is hardware revision B or later 

23 GHz 

2 GHz 

138862x–yL 

where x is hardware revision and y is 

one or more digits 

26.5 GHz 

2 GHz 

 

Software Environment 

The 6G SubTHz Waveform Research examples are designed for using in a system that includes software components. 

The examples run on the PXI controller with Windows 10 (64-bit) operating system. The required software varies depending on the PXIe-5842 VST assembly. The following table defines the required software when you use the PXIe-5842 VST assembly with Part Number: 13507712-40. 

Software 

Version 

Package Manager 

Latest 

LabVIEW 

2022 Q3 (64-bit) 

LabVIEW FPGA Module 

2022 Q3 (64-bit) 

FlexRIO 

2023 Q2 

RFmx NR 

2022 Q4 

RFmx SpecAn 

2022 Q4 

NI-RFSA 

2022 Q4 

NI-RFSG 

2022 Q4 

NI-RFSG Playback Library 

2022 Q4 

RFmx Waveform Creator 

2022 Q4 

LabVIEW Modulation Toolkit 

2022 Q4 

NI-SCOPE 

2022 Q3 

LabVIEW Digital Filter Design Toolkit 

2022 Q3 

NI DataPlugin for MATLAB® MAT-files 

21.0 

* PXIe-5842 4GHz IBW Support 

2022 Q4 

* 6G Sub-THz Validation Test Reference Architecture 

2023 Q4 

 

* Note: The software marked with * are not visible in Package Manager. Contact your designated support channel to obtain the software. 

If you use a PXIe-5842 VST assembly with a different part number from 13507712-40, contact your designated support channel to get software environment list. 


 

Example Workflow 

The 6G SubTHz Waveform Research examples involve operations with NI-RFmx, NI-RFSG, NI-RFSA, FlexRIO, and DataPlugin for MATLAB® MAT-files on the devices. The operations vary depending on example instances and user interaction. 

 

After you run an instance of example, the instance operates as follows: 

  1. Initialize NI-RFmx, commit spectrum analysis setting to PXIe-5842. The spectrum analyzer inside PXIe-5842 waits for the RF raw I/Q data. 

  1. Initialize NI-RFSA, commit acquisition setting to PXIe-5842. The acquisitor inside PXIe-5842 waits for the Rx antenna port to receive RF signals. 

  1. Initialize NI-RFSG, commit waveform generation setting to PXIe-5842. The generator inside PXIe-5842 waits for the waveform streams from PXIe-7903. 

  1. Initialize PXIe-7903 FPGA bit file and set up communication between PXIe-7903 and PXIe-5842. 

  1. It initializes another NI-RFSG and commits LO parameters to PXIe-5654. 

  1. Perform either of the following operations according to the waveform file format: 

  1. If you use TDMS format, the instance reads waveform and downloads waveform to PXIe-7903. 

  1. If you use MAT format, the instance reads waveform from a MAT file and transfers it to a temporary TDMS file, then reads the TDMS file and downloads waveform to PXIe-7903. 

  1. Initialize a TDMS session and create a new TDMS file for recording at the user-defined location. 

  1. Start waveform generation. 

  1. Repeat the following operations until you click record button or stop button or terminate this example: 

  1. Command the PXIe-7903 to fetch a burst of RF acquisition data from PXIe-5842. 

  1. Retrieve the acquisition data from PXIe-7903 to the PXI controller. 

  1. Stream the data from the PXI controller to the spectrum analyzer, get measurement results, and present the results on the example front panel. 

  1. Check the session health status of NI-RFmx, NI-RFSA, NI-RFSG, and FlexRIO classes. 

  1. Enter the next iteration. 

 

After you click the record button, the instance operates as follows: 

  1. Command the PXIe-7903 to fetch as many samples as you specify from PXIe-5842. 

  1. Retrieve the samples from PXIe-7903 to the PXI controller. 

  1. Write the samples to a TDMS file. 

  1. Calculate the speed of recording. 

  1. If you specify saving record as MAT file, the instance transfers the TDMS file to the MAT file. 

 

After you click the stop button or recording is complete, the instance operates as follows: 

  1. Close the sessions of NI-RFmx, NI-RFSA, NI-RFSG, TDMS, FPGA, and FlexRIO classes. 

  1. If you specify saving record as MAT file, the instance deletes the existing  TDMS file. 

 

 

 

Preparing for Using the Examples 

Complete the following steps to prepare for using the 6G SubTHz Waveform Research examples. 

  1. Connecting the System Components 

  1. Installing the Software 

  1. Generating TDMS Waveform Files 

  1. Generating MATLAB MAT Waveform Files 

 

Connecting the System Components 

To use the 6G SubTHz Waveform Research examples, connect system components as the following figure shows.  

Note: You must complete all connections before applying the power, and transmit the IF and LO signals to the converters only after applying the power. 

 

A diagram of a machine  Description automatically generated 

 

 

 

Installing the Software 

  1. Prepare a VDI library. 

           1.1Download the VDI PM5 File from https://www.vadiodes.com/en/resources/downloads

           1.2 Unzip the downloaded file to a folder named CD. 

           1.3 Copy CD\CDM 2.04.06 WHQL  Certified\amd64\ftd2xx64.dll to the following folder: C:\Program Files\National Instruments\LabVIEW 2022\resource. 

           1.4 Run the Check PM5B Example.vi in the following directory: C:\Program Files\National Instruments\LabVIEW 2022\user.lib\6G SubTHz\Power Meter\Test. Make sure this VI does not return any error. 

 

  1. Install required software in Software Environment Section. MATLAB or MATLAB Runtime is not mandatory for using the 6G SubTHz Waveform Research examples as only need to read or to store waveform data from or to MAT files. 

 

  1. Install the 6G SubTHz Waveform Research examples. After installation, the examples are in the following directory: C:\Program Files\National Instruments\LabVIEW 2022\examples\6G SubTHz Research. 

Generating TDMS Waveform Files 

Use the existing default TDMS waveform file in “C:\Program Files\National Instruments\LabVIEW 2022\user.lib\6G SubTHz\Test App\Waveforms”. 

Alternatively, you can use the RFmx Waveform Creator to generate TDMS waveform files that the 6G SubTHz Waveform Research example can directly play. To learn more about the RFmx Waveform Creator, visit the following link: https://www.ni.com/docs/en-US/bundle/rfmx-waveform-creator/page/user-manual-welcome.html. 

Generating MATLAB MAT Waveform Files 

The 6G SubTHz Waveform Research examples can read MAT waveform files with the same name and same type variables as the following table lists. 

Variable name 

Class 

Description 

SampleRate 

double 

Sample rate of the waveform 

txBandwidth 

double 

Bandwidth of the waveform 

txWaveform 

single (complex) 

OFDM waveform 

Note: The variable name is case sensitive. 

 

The following figure shows example variables settings loaded from the expected MAT file to the online MATLAB workspace. For more information about the online MATLAB, visit the following link: https://matlab.mathworks.com. 

A screenshot of a computer  Description automatically generated

 

Use the following MATLAB APPs to generate the MAT waveform file. 

MATLAB APP name 

Introduction page 

6G Exploration Library for 5G Toolbox® 

https://ww2.mathworks.cn/matlabcentral/fileexchange/157771-6g-exploration-library-for-5g-toolbox 

5G Waveform Generator® 

https://ww2.mathworks.cn/help/5g/ref/5gwaveformgenerator-app.html 

 

  1. If you generate a MATLAB MAT waveform file with 6G Exploration Library for 5G Toolbox, follow the instructions in Get Started with 6G Exploration Library, and then save the MAT file from the workspace. 

 

  1. If you generate a MATLAB MAT waveform file with 5G Waveform Generator, complete the following steps after file generation. 

          2.1 Click the “Export” button and save an IQ mat file.            
          2.2 Import the IQ mat file to the baseband and combine the I array and Q array into a complex double variable called “txWaveform”.
          2.3 Add two variables called “txBandwidth”and "SampleRate" on the workspace, store the bandwidth and sample rate separately. 
          2.4 Save a mat file from the workspace. 

Note: The previous instructions may vary as the MathWorks company upgrades or maintains the 6G Exploration Library for 5G Toolbox or 5G Waveform Generator. 

Note: MATLAB®, 6G Exploration Library for 5G Toolbox®, and 5G Waveform Generator® are registered trademarks of The MathWorks, Inc. Other product and company names listed are trademarks and trade names of their respective companies. 
 

Using SubTHz 2GHz BW Waveform record and playback (PXIe-7903) Example 

This example works only when you use the PXIe-5842 VST assembly with PN: 135077x–01L or 138862x–yL (where x is hardware revision and y is one or more digits). 

You can find this example in “C:\Program Files\National Instruments\LabVIEW 2022\examples\6G SubTHz Research\ SubTHz 2GHz BW Waveform\ SubTHz 2GHz BW Waveform.lvproj”. 

  1. Run LabVIEW 2022 as administrator, and launch 2GHz BW Waveform record and playback (PXIe-7903).vi in SubTHz 2GHz BW Waveform.lvproj. 

  1. Configure parameters by following the instructions on the VI front panel. Refer to Configuration Parameter Descriptions for more information. 

  1. Run the VI. 

  1. View measurement results. 

  1. Click the “Record” button to save the IQ data to the location you specify or click the “Stop” button to stop this VI. 

  1. Run the example again with new settings. 

 

Using SubTHz 4GHz BW Waveform record and playback (PXIe-7903) Example 

This example works only when you use the PXIe-5842 VST assembly with PN: 135077x–40L (where x is hardware revision B or later). 

You can find this example in “C:\Program Files\National Instruments\LabVIEW 2022\examples\6G SubTHz Research\SubTHz 4GHz BW Waveform (PXIe-7903)\Host\SubTHz 4GHz BW Waveform (PXIe-7903) Host.lvproj”. 

 

  1. Run LabVIEW 2022 as administrator, and launch SubTHz 4GHz BW Waveform record and playback (PXIe-7903).vi in SubTHz 4GHz BW Waveform (PXIe-7903) Host.lvproj. 

  1. Configure parameters by following the instructions on the VI front panel. Refer to Configuration Parameter Descriptions for more information. 

  1. Run the VI. 

  1. View measurement results. 

  1. Click the “Record” button to save the IQ data to the location you specify or click the “Stop” button to stop this VI. 

  1. Run the example again with new settings. 

 

 

Next Steps

TDMS Record File Content 

The TDMS record file contains the following variables. 

Variable name 

Variable type 

Description 

NI_DataType 

double 

Default value: 2, representing the IQ samples were I16 type 

NI_ChannelLength 

double 

Number of I16 IQ samples 

NI_RF_SignalBandwidth 

double 

Bandwidth of the PXIe-5842 receiver 

NI_RF_IQRate 

double 

Sample rate of the PXIe-5842 receiver. The value is expressed in samples per second (S/s). 

dt 

double 

Reciprocal of NI_RF_IQRate 

Scale.Gain 

double 

Multiplier to scale unscaled IQ data 

Scale.Offset 

double 

Number to scale unscaled IQ data 

Group name 

String 

Default value: waveforms 

Channel name 

String 

Default value: Channel 0 

 

The TDMS record file contains only one channel of IQ data. The data is Integer 16 bits type with the first 16 bits representing imagine part of complex IQ data and the second 16 bits representing real part of complex IQ data. 

The 6G SubTHz Waveform Research examples can read this file to replay back to system. 

 

MAT Record File Content  

The MAT record file contains the following variables. 

Variable name 

Variable type 

Description 

txWaveform 

Array of double 

IQ data. The data is Integer 16 bits type with the first 16 bits representing imagine part of complex IQ data and the second 16 bits representing real part of complex IQ data. 

RF_Center_Frequency__Hz_ 

double 

Center frequency in Hz, in a spectrum acquisition. An acquisition consists of a span of data surrounding the center frequency. 

RFSA_Offset 

double 

Number to scale unscaled txWaveform data 

RFSA_Gain 

double  

Multiplier to scale data unscaled txWaveform data 

SampleRate 

double 

I/Q sample rate of the PXIe-5842 acquisition. The value is expressed in samples per second (S/s). 

txBandwidth 

double 

Bandwidth in Hz of the PXIe-5842 acquisition 

Sideband 

Char 

Sideband parameter of PXIe-5654 

The 6G SubTHz Waveform Research examples can read this file to replay back to system. 

Configuration Parameter Descriptions 

Both 6G SubTHz 4GHz Bandwidth Waveform Research Example and 6G SubTHz 2GHz Bandwidth Waveform Research Example use the following configuration parameters. 

Field name: Resources 

 

Parameter name: PXIe-5842 Resource Name 

Description: Specify the resource name of the PXIe-5842. Select a device from the drop-down list. If you cannot find the desired resource name from the list, follow this guide (Configuring the PXIe-5842 in MAX - NI) to set up your PXIe-5842. 

Default value: VST3 

 

 

Parameter name: PXIe-7903 Resource Name 

Description: Specify the resource name of the PXIe-7903. Select a device from the drop-down list. If you cannot find the desired resource name from the list, follow this guide (Verifying the Installation in MAX - NI) to set up your PXIe-7903. 

Default value: FPGA-7903 

 

Parameter name: PXIe-7903 Bitfile Path 

Description: Specify the bit file used by PXIe-7903. You can find a standard FPGA project located in “Default value”. This project allows you to modify the FPGA logic, like adding Digital signal processing, and then build a new bit file. 

Default value: The path of a validated bit file 

 

Field name: Waveform File Format and Path 

 

Parameter name: Waveform File Format 

Description: Specify the waveform file format. Select either the “TDMS” or “MATLAB” tab. 

Default value: TDMS 

 

 

 

Parameter name: Waveform File Path 

Description: Specify the waveform file path. Click the “...” button to select your file in Windows Explorer. 

Default value: The path of a validated TDMS file 

 

Parameter name: MATLAB Waveform File Path 

Description: Specify the waveform file path. Click the “...” button to select your file in Windows Explorer. 

Default value: N/A 

 

Parameter name: Waveform scale factor 

Description: This parameter applies only when Waveform File Format is MATLAB. This parameter specifies the scaling factor for the waveform to the raw IQ complex data read from MATLAB. 

Default value: 20 

 

Field name: Record 

 

Parameter name: Record File Format 

Description: Specify the format of the record file before recording starts. Select either the “TDMS” or “MATLAB” tab. 

Default value: TDMS 

 

 

 

Parameter name: Total Samples to TDMS Record 

Description: Specify how many samples to record before recording starts. Consider the following factors:  

1. Space of volume: as each sample occupies 4B, the hard disk should have enough space to storage this record file. 

2. Limitation of PXIe-7903: data is buffered by FPGA DRAM, whose maximum size is 10 GB one bank. If more than 2.6e9 samples are recorded, which means occupying more than 10 GB in FPGA DRAM, an error will occur to stop this example. 

Default value: 2e9 Samples 

 

Parameter name: Total Samples to MAT Record 

Description: Specify how many samples to record before recording starts. Consider the following factors:  

1. Space of volume: as each sample occupies 4B, the hard disk should have enough space to storage this record file. 

2. data is buffered by FPGA DRAM, whose maximum size is 10 GB one bank. If more than 2.6e9 samples are recorded, which means occupying more than 10 GB in FPGA DRAM, an error will occur to stop this example. 

3. Limitation of writing a MAT file: 260e6 samples 

Default value: 260e6 Samples 

 

Parameter name: Record File Path 

Description: Specify the destination location of the record file before recording starts. Click the “...” button to select a folder in Windows Explorer. 

Default value: The path of a folder 

 

Field name: Up/Down Converter LO 

 

Parameter name: PXIe-5654 Resource Name 

Description: This parameter specifies the resource name of the PXIe-5654. Select a device from the drop-down list. If you cannot find the desired resource name from the list, follow this guide (Configuring the NI 5654 in MAX - NI ) to set up your PXIe-5654. 

Default value: LO1 

 

 

 

 

 

 

 

Parameter name: PXIe-5654 Power Level (dBm) 

Description: Specify the average power level of the generated LO signal. 

Default value: 14 dBm 

 

Parameter name: RF Center Frequency (Hz) 

Description: Specify the center frequency in Hz, in a spectrum acquisition. An acquisition consists of a span of data surrounding the center frequency. 

Default value: 155e9 Hz 

 

Parameter name: Calibration File Path 

Description: Specify the path of the calibration file. The 6G Sub-THz Calibration Tool, embedded in the 6G Sub-THz Parametric Measurement Testbench UI, generates the calibration file. For more information, refer to the 6G SubTHz Validation User Manual located in “C:\Users\Public\Documents\National Instruments\6G SubTHz Validation Test Software\Documentation”. NI recommends performing system calibration before running this example with PXIe-5654 and VDI Up/Down Converter. 

Default value: N/A 

 

Field name: PXIe-5842 Parameters 

 

Parameter name: Power Level (dBm) 

Description: Specify the average power level of the generated RF signal. 

Default value: -12 dBm 

 

 

Parameter name: Reference Level (dBm) 

Description: Specify the maximum expected power of an RF input signal. 

Default value: -3 dBm 

 


 

Troubleshooting 

Troubleshoot common errors with the solutions in the following table. For unexpected behavior the table does not include, restart the system. 

 

Error 

Solution 

Error -68002  

Failed to reserve file size. If you are running the TDMS Reserve File Size function on Windows with User Account Control enabled, you must run LabVIEW or the application with administrator privileges. 

 

Run LabVIEW 2022 as Administrator. 

Error -1074101976  

Requested number of samples and number of records do not fit in memory. Use a smaller allocation, disable the input terminal that requires records to fit in memory, or set 'number of samples is finite' or 'number of records is finite' to false on the Configure Acquisition VI. 

 

Set the Total Samples to Record parameter to a value smaller than 2.6e9. 

Error -1074101883  

Failed to look up the address space with the parameters specified. The corresponding address space may not be instantiated and connected to the instruction framework on the target. You may need to load a different bit file on your FPGA target. 

 

The FPGA bit file that PXIe-7903 uses is not validated, like: lack of necessary FPGA IP, etc.. You need to load a validated bit file.  

Error -1074118128  

The waveform input cluster contains no values. 

The specific waveform file cannot be loaded due to issues, such as lack of necessary properties or incorrect data type. Refer to Generating TDMS Waveform Files and 

Generating MATLAB MAT Waveform Files to learn how to generate a suitable waveform file. 

 

Error -303823  

Incorrect data type. The Data Type of the waveform is not supported: Unidentified Data Type 

Error -303814  

A property is missing in the TDMS waveform file. 

Missing Property in the File: NI_RF_Headroom 

Error -303823 

Incorrect data type. The Data Type of the waveform is not supported: Unidentified Data Type 

Error -1074101596  

The total memory of all waveforms exceeds the allocated amount of memory on the FPGA. 

The specific waveform file is larger than 10 GB, which fills up the FPGA DRAM space in PXIe-7903. You need to choose a smaller waveform file. 

Error -1074097882  

The requested property value is invalid. A possible reason may be conflicts with another property. 

 

Property: IQ Rate (S/s) 

Requested Value: 5000000000 

Minimum Value: 38146.9726563 

Maximum Value: 2500000000 

Ensure you use the applicable PXIe-5842 VST for the example. 

This error occurs when you use the 6G Sub-THz 2 GHz Bandwidth Waveform Research Example with the PXIe-5842 VST assembly with PN: 135077x–40L. Correct PN should be 135077x–01L or 138862x–yL. Please double check the part number in Measurement & Automation Explorer (MAX) 

 

Contact your designated support channel if restarting the system or trying the above troubleshooting solutions does not resolve your issues.