Create Waveforms Using Wireless Waveform Generator App
The Wireless Waveform Generator app is an interactive tool for creating, impairing, visualizing, and exporting modulated waveforms.
Start the app. On the Apps tab in the MATLAB® toolstrip, under Signal Processing and Communications,
click the app icon . You can also start the app by entering
wirelessWaveformGenerator
at the MATLAB command prompt.
These are the typical workflows when using the Wireless Waveform Generator app.
Generate a waveform.
Select the desired waveform type from the options available in the Waveform Type section. Adjust the configuration parameters in the Waveform pane. For more information, see Waveform Type.
Select Impairments in the Generation section to open the Impairments pane. Adjust the configuration parameters in the Impairments pane. For more information, see Add Impairments.
To perform signal generation, click Generate. After generation, the waveform is displayed. You can adjust the waveform, filtering, and impairment configurations and then regenerate the waveform.
The default visualization plots vary based on the waveform type selected. Additional Visualization Options can be opened by selecting them from Visualize in the Generation section.
After generating a waveform you can
Export the waveform to a file by selecting the desired options from Export in the Export section. For more information, see Export Waveform.
Transmit the waveform by selecting and configuring the desired lab test instrument. For more information, see Transmit Using Lab Signal Generator Instrument.
Transmit the waveform by selecting and configuring the desired software-defined radio (SDR). For more information, see Transmit Signals Using Wireless Testbench Baseband Transmitter and Transmit Using SDR.
You can save the current session, open a previously saved session, or open a new session by selecting the desired option in the File section. For more information, see Waveform Generator Session.
Waveform Type
To generate the various available waveforms, the Wireless Waveform Generator app uses Communications Toolbox™ features. The supported waveform types include:
OFDM — The app uses the
comm.OFDMModulator
System object™ to generate this type of waveform.QAM — The app uses the
qammod
function to generate this type of waveform.PSK — The app uses the
pskmod
function to generate this type of waveform.Sinewave — The app uses the
dsp.SineWave
System object to generate this type of waveform.5G — If you have the 5G Toolbox™, you can also generate 5G NR waveforms using features in the 5G Toolbox. For more information, see the 5G Waveform Generator (5G Toolbox) app reference page.
LTE — If you have the LTE Toolbox™ you can also generate LTE modulated waveforms using features in the LTE Toolbox. For more information, see the LTE Waveform Generator (LTE Toolbox) app reference page.
WLAN — If you have the WLAN Toolbox™ you can also generate 802.11™ modulated waveforms using features in the WLAN Toolbox. For more information, see the WLAN Waveform Generator (WLAN Toolbox) app reference page.
Bluetooth® — If you have the Bluetooth Toolbox you can also generate Bluetooth modulated waveforms using features in the Bluetooth Toolbox.
DVB-S2, DVB-S2X, and DVB-RCS2 — If you have the Satellite Communications Toolbox you can also generate satellite communications waveforms using features in the Satellite Communications Toolbox. For more information, see the Satellite Waveform Generator (Satellite Communications Toolbox) app reference page.
FMCW, Linear FM, Rectangular, and Phased Coded — If you have the Phased Array System Toolbox™ you can also generate radar waveforms using features in the Phased Array System Toolbox.
ZigBee® and UWB (IEEE® 802.15.4a/z) — The app uses the
lrwpanWaveformGenerator
function, andlrwpanHRPConfig
andlrwpanOQPSKConfig
objects to generate these types of waveforms.
By default, generated waveforms have no filtering applied. To apply filtering to the waveform, select the desired filter option from the Filtering parameter on the Waveform pane. The available filter options vary based on the waveform type you select.
Add Impairments
You can add these impairments to the waveform that you generate.
AWGN — The app uses the
awgn
function to impair the waveform.Phase offset — The app impairs the waveform by applying the specified phase offset as y = xejφ, where φ is the phase offset in radians.
Frequency offset — The app uses the
comm.PhaseFrequencyOffset
System object to impair the waveform.Phase noise — The app uses the
comm.PhaseNoise
System object to impair the waveform.DC offset — The app impairs the waveform by applying the specified DC offset as y = x + dcOff, where dcOff is the complex DC offset in Volts.
IQ imbalance — The app uses the
iqimbal
function to impair the waveform.Memoryless cubic nonlinearity — The app uses the
comm.MemorylessNonlinearity
System object to impair the waveform.
Visualization Options
You can use these plot types to visualize waveforms that you generate.
Spectrum Analyzer — The app plots the waveform in the frequency domain.
OFDM Grid — For OFDM waveforms, the app plots the resource allocation of data and control channels.
Time scope — The app plots the inphase and quadrature (IQ) waveform samples in the time domain.
Constellation diagram — The app plots the constellation points of the modulation symbols. For the OFDM waveform type, the constellation diagram displays the signal before OFDM modulation.
Export Waveform
You can export the waveform to a runnable MATLAB script or Simulink® block, to your workspace, or to a signal file.
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.
Waveforms exported to the workspace are saved as a structure containing these fields:
type
— This field is a character vector indicating the waveform type.config
— This field is a structure or object containing fields that specify the configured waveform type.Fs
— This field is the signal sample rate in Hertz.waveform
— The field is the complex waveform samples output as an NS-by-1 column vector or an NS-by-NT matrix. NS is the number of time-domain samples, and NT is the number of transmit antennas.
Waveforms exported to a signal file can be saved as a .mat, .bb, or .txt file.
MAT-files are binary MATLAB files that store workspace variables. For more information, see MAT-File Versions.
BB-files are binary files. The app uses the
comm.BasebandFileWriter
System object to save .bb files.TXT-files are ascii files that store IQ data only.
Transmit Using Lab Signal Generator Instrument
Generate a waveform that you can transmit using Instrument Control Toolbox and your lab signal generator instrument.
The Wireless Waveform
Generator app can transmit using the rfsiggen
(Instrument Control Toolbox) function with instruments that support:
TCP/IP interface and use either the AgRfSigGen, RsRfSigGen, AgRfSigGen_SCPI, or RsRfSigGen_SCPI driver.
PXI interface and use the NI-RFSG driver.
For more information, see Quick-Control RF Signal Generator Requirements (Instrument Control Toolbox).
To transmit a waveform, follow these steps:
Have your supported lab signal generator instrument connected to your computer.
From Transmitter Type in the Transmitter tab, select the appropriate signal generator icon:
Use the options in the Transmitter pane to configure the signal conditioning and transmission settings.
Start the continuous transmission by clicking Transmit.
To end the transmission, click Stop Transmission.
Transmit Signals Using Wireless Testbench Baseband Transmitter
Generate waveforms that you can transmit using Wireless Testbench,
Wireless Testbench™ Support Package for NI™
USRP™ Radios, and a supported NI
USRP radio. The Wireless Waveform
Generator app can transmit the waveform using the basebandTransmitter
(Wireless Testbench) object.
To transmit a waveform, follow these steps:
Use the Radio Setup (Wireless Testbench) wizard to connect your radio to your computer and MATLAB.
From Transmitter Type in the Transmitter tab, select the appropriate radio icon:
Use the options in the Transmitter pane to configure the signal conditioning and transmission settings.
Start the continuous transmission by clicking Transmit.
To end the transmission, click Stop Transmission.
For an example, see Transmit App-Generated Wireless Waveform Using Radio Transmitters.
Transmit Using SDR
Generate a waveform that you can transmit using supported SDR hardware. Download and install the add-on associated with your SDR, and then the Wireless Waveform Generator app can transmit waveforms using the associated System object. The table details the supported radio hardware, the associated support package, and the System object used to transmit the waveform.
Radio Hardware | Support Package | Transmitter System object |
---|---|---|
Analog Devices® ADALM-Pluto radio | Communications Toolbox Support Package for Analog Devices ADALM-Pluto Radio | comm.SDRTxPluto |
USRP B2xx series or N2xx series radio | Communications Toolbox Support Package for USRP Radio | comm.SDRuTransmitter |
USRP N3xx series or X series radio | Wireless Testbench Support Package for NI USRP Radios | comm.SDRuTransmitter (Wireless Testbench) |
USRP E310 or E312 | Communications Toolbox Support Package for USRP Embedded Series Radio | comm.SDRTxE3xx |
Xilinx® Zynq®-based radio | SoC Blockset™ Support Package for AMD FPGA and SoC Devices | comm.SDRTxAD936x (SoC Blockset) or comm.SDRTxFMCOMMS5 (SoC Blockset) |
For more information, see Supported Hardware – Software-Defined Radio.
To transmit a waveform, follow these steps:
Connect your radio hardware to your computer and MATLAB by following the instructions specific to the hardware support package.
From Transmitter Type in the Transmitter tab, select the appropriate radio icon:
Use the options in the Transmitter pane to configure the signal conditioning and transmission settings.
Start the continuous transmission by clicking Transmit.
To end the transmission, click Stop Transmission.
Waveform Generator Session
You can save the current session, open a previously saved session, or open a new session by selecting the desired option in the FILE section. When you save a waveform generator session, the session configuration is saved as a .mat file. For more information, see MAT-File Versions.
See Also
Apps
Functions
rfsiggen
(Instrument Control Toolbox)
Blocks
Related Topics
- Generate Wireless Waveform in Simulink Using App-Generated Block
- Quick-Control RF Signal Generator Requirements (Instrument Control Toolbox)
- MAT-File Versions