Main Content

5G Waveform Generator

Create, impair, visualize, and export 5G NR waveforms

Since R2020a

Description

The 5G Waveform Generator app enables you to create, impair, visualize, and export 5G NR waveforms.

The app provides these capabilities by using the Wireless Waveform Generator app configured for 5G NR waveform generation. Using the app, you can:

  • Generate NR uplink and downlink carrier waveforms.

  • Generate NR test models (NR-TM) for FR1, as defined in TS 38.141-1 Section 4.9.2 [1].

  • Generate NR-TM for FR2, as defined in TS 38.141-2 Section 4.9.2 [2].

  • Generate NR downlink fixed reference channel (FRC) waveforms, as defined in TS 38.101-1 Annex A.3 [3].

  • Generate NR uplink FRC waveforms, as defined in TS 38.104 Annex A [4].

  • Export the NR waveform to your workspace or to a .mat, .bb, or .txt file.

  • Export NR waveform generation parameters to an executable MATLAB® script or a Simulink® block.

    • Use the exported script to generate your waveform without the app from the command line.

    • Use the exported block as a waveform source in a Simulink model. For more information, see Waveform From Wireless Waveform Generator App.

  • Visualize the NR waveform in spectrum analyzer, channel view, OFDM grid, resource element (RE) mapping (only downlink and uplink), and complementary cumulative distribution function (CCDF) plots. The app instantly updates the OFDM grid and the channel view plots to reflect the current waveform configuration. The OFDM grid also highlights the conflicts across channels and signals.

  • Distort the NR waveform by adding RF impairments, such as AWGN, phase offset, frequency offset, DC offset, IQ imbalance, and memoryless cubic nonlinearity.

  • Generate an NR waveform that you can transmit using a connected signal generator or software-defined radio (SDR).

To create, impair, visualize, and export waveforms other than NR waveforms, you must reconfigure the app. For a full list of features, see the Wireless Waveform Generator app.

For more information, see Create Waveforms Using Wireless Waveform Generator App.

5G Waveform Generator app

Open the 5G Waveform Generator App

MATLAB Toolstrip: On the Apps tab, under Signal Processing and Communications, click the app icon.

MATLAB Command Prompt: Enter nrWaveformGenerator. This command opens the Wireless Waveform Generator app configured for 5G waveform generation.

Examples

expand all

This example shows how to generate standard-compliant NR uplink and downlink carrier waveforms, NR test models (NR-TM), and NR uplink and downlink fixed reference channel (FRC) waveforms by using the 5G Waveform Generator app. The example also discusses waveform exporting and transferring options available in the app.

Open 5G Waveform Generator App

On the Apps tab of the MATLAB® toolstrip, under Signal Processing and Communications, click the 5G Waveform Generator app icon. This app opens the Wireless Waveform Generator app configured for 5G waveform generation.

Select 5G NR Waveform

In the Waveform Type section on the app toolstrip, click the waveform you want to generate. Select one of these waveforms.

  • 5G Downlink

  • 5G Uplink

  • 5G Test Models

  • 5G Downlink FRC

  • 5G Uplink FRC

Generate 5G NR Waveform

Depending on the selected waveform, the app presents specific tabs where you can set the parameters of the selected waveform. On the app toolstrip, in the Generation section, you can add impairments and set visualization tools applicable for the selected waveform. To visualize the waveform on the selected visualization tools, click Generate.

For example, this figure shows the visualization results of a 5G NR downlink waveform using default parameters.

Export Generated Waveform to MATLAB Workspace or File

To export the generated waveform, on the app toolstrip, in the Export section, select Export to Workspace or Export to File. You can export the waveform as a structure to the MATLAB workspace or a MAT-file (.mat). You can also export the waveform to a baseband file (.bb).

Export Waveform Configuration Parameters to MATLAB Script

To export waveform configuration parameters as a MATLAB script, on the app toolstrip, in the Export section, select Export MATLAB Script. You can run the exported MATLAB script to generate the waveform without the app.

Export Waveform Configuration Parameters to Simulink

To export waveform configuration parameters as a Simulink block, on the app toolstrip, in the Export section, select Export to Simulink. You can use the exported block to generate the waveform in a Simulink model without the app.

Transmit 5G NR Waveform

To transmit the generated waveform using a connected radio or lab test instrument, on the app toolstrip, click on the Transmitter tab.

  • To transmit your waveforms over the air at full radio device rates, use the Wireless Testbench™ software and connect a supported radio to your computer. For a list of radios that support full device rates, see Supported Radio Devices (Wireless Testbench). This feature requires Wireless Testbench.

  • To transmit a waveform by using an SDR, connect one of the supported SDRs (ADALM-Pluto, USRP™, USRP embedded series, and Xilinx® Zynq-based radios) to your computer and have the associated add-on installed. For more information, see Transmit Using SDR.

  • To transmit a waveform by using a lab test instrument, connect one of the instruments supported by the rfsiggen (Instrument Control Toolbox) function to your computer. For more information, see Quick-Control RF Signal Generator Requirements (Instrument Control Toolbox). This feature requires Instrument Control Toolbox.

This example shows how to use the NI™ USRP™ N300, N310, USRP N320, USRP N321, USRP X300, X310, and USRP X410 radio transmitters available in the Wireless Waveform Generator app to transmit an app-generated waveform over the air (requires Wireless Testbench™). These radio transmitters enable you to transmit up to 2 GB of contiguous data over the air at the maximum baseband sample rate supported by the radio device.

Introduction

The Wireless Waveform Generator app is an interactive tool for creating, impairing, visualizing, and transmitting waveforms. Using a radio transmitter available in the app, you can transmit your generated waveform repeatedly over the air. You can also export the waveform generation and transmission parameters to a runnable MATLAB® script. This example shows how to configure these radio transmitters.

Although this example shows how to transmit an OFDM waveform, the same process applies for all waveform types that you can generate with the app.

Set Up for Radio Transmission

To use the radio transmitters in the app, you need to Install Support Package for NI USRP Radios (Wireless Testbench) and set up your radio using the Radio Setup (Wireless Testbench) wizard.

Generate Waveform for Transmission

Open the Wireless Waveform Generator app by clicking the app icon on the Apps tab, under Signal Processing and Communications. Alternatively, enter wirelessWaveformGenerator at the MATLAB command prompt.

In the Waveform Type section, select an OFDM waveform by clicking OFDM. In the leftmost pane of the app, adjust any configuration parameters for the selected waveform. Then generate the configuration by clicking Generate in the app toolstrip.

Configure Radio Transmitter

Select the Transmitter tab from the app toolstrip. In the transmitter gallery, select a radio transmitter.

In the leftmost pane of the app, select the name of a radio setup configuration that you saved using the Radio Setup (Wireless Testbench) wizard.

Set the center frequency, gain, and antennas configuration parameters. The app automatically sets the waveform sample rate based on the waveform that you generated earlier. The radio transmitter uses onboard data buffering to ensure contiguous data transmission at up to the maximum baseband sample rate supported by the radio device. To achieve the specified sample rate, the radio uses a Farrow rate converter. If necessary, use this list as a reference when setting the sample rate:

  • USRP N300 -- 120,945 Hz to 76.8 MHz, or one of: 122.88 MHz, 125 MHz, or 153.6 MHz

  • USRP N310 -- 120,945 Hz to 76.8 MHz, or one of: 122.88 MHz, 125 MHz, or 153.6 MHz

  • USRP N320 -- 196,851 Hz to 125 MHz, or one of: 200 MHz, 245.76 MHz or 250 MHz

  • USRP N321 -- 196,851 Hz to 125 MHz, or one of: 200 MHz, 245.76 MHz or 250 MHz

  • USRP X300 -- 181,418 Hz to 100 MHz, or one of: 184.32 MHz or 200 MHz

  • USRP X310 -- 181,418 Hz to 100 MHz, or one of: 184.32 MHz or 200 MHz

  • USRP X410 -- 241,890 Hz to 125 MHz, or one of: 245.76 MHz or 250 MHz

Transmit Waveform

To transmit the waveform continuously, click Transmit. To end the continuous transmission, click Stop transmission. To export the waveform generation and transmission parameters to a runnable MATLAB script, click Export MATLAB script.

Limitations

In MATLAB Online™, the 5G Waveform Generator does not support signal transmission with SDR devices or test instruments.

References

[1] 3GPP TS 38.141-1. “NR; Base Station (BS) conformance testing Part 1: Conducted conformance testing.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

[2] 3GPP TS 38.141-2. “NR; Base Station (BS) conformance testing Part 2: Radiated conformance testing.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

[3] 3GPP TS 38.101-1. “NR; User Equipment (UE) radio transmission and reception; Part 1: Range 1 Standalone.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

[4] 3GPP TS 38.104. “NR; Base Station (BS) radio transmission and reception.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

Version History

Introduced in R2020a

expand all