Main Content

Bluetooth LE Waveform Generator

Create, impair, visualize, and export Bluetooth LE waveforms

Since R2022a

Description

The Bluetooth Low Energy Waveform Generator app enables you to create, impair, visualize, and export modulated Bluetooth® low energy (LE) waveforms.

To use this app, you must configure the Wireless Waveform Generator app for Bluetooth LE waveform generation. Using this app, you can:

  • Generate Bluetooth LE waveforms with physical layer (PHY) data rate of 2 Mbps, 1 Mbps, 500 Kbps, or 125 Kbps.

  • Generate Bluetooth LE direction-finding waveforms specified in the Bluetooth Core Specifications 5.1 [2].

  • Configure, generate, and visualize Bluetooth LE radio frequency (RF) PHY transmitter and receiver test waveforms as specified in [4]. For information about the Bluetooth LE RF PHY tests that the app supports, see Overview of Bluetooth Test and Measurement.

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

  • Export Bluetooth LE waveform generation parameters to a runnable 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 the Waveform From Wireless Waveform Generator App block.

  • Visualize the Bluetooth LE waveform in the spectrum analyzer, time scope, constellation diagram, and eye diagram.

  • Distort the Bluetooth LE waveform by adding radio frequency (RF) impairments, such as additive white Gaussian noise (AWGN), phase offset, frequency offset, DC offset, in-phase and quadrature (IQ) imbalance, and memoryless cubic nonlinearity.

  • Generate a waveform that you can transmit using a connected radio or lab test instrument. The Transmitter tab shows the signal generator, radio transmitter, and SDR options available. Transmitter options include signal generator (Instrument or NI-VST), radio transmitter (USRP N310, USRP N320, USRP N321, USRP X310, USRP X410), software defined radio (Pluto, USRP B/N/X, USRP E, Zynq Based).

    • To transmit a waveform by using a lab signal generator, you must have Instrument Control Toolbox. For more information, see Quick-Control RF Signal Generator Requirements (Instrument Control Toolbox). If you select Transmitter, the connected lab test instrument must:

      • Support the TCP/IP interface.

      • Use one of these drivers — AgRfSigGen, RsRfSigGen, AgRfSigGen_SCPI, or RsRfSigGen_SCPI.

      • Be supported by the rfsiggen (Instrument Control Toolbox) function.

      If you select NI-VST, the connected lab test instrument must:

      • Support the PXI interface NI-RFSG option when an NI VST resource is selected.

      • Use the NI-RFSG driver.

      • Be supported by the rfsiggen (Instrument Control Toolbox) function.

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

    • 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. For an example, see Transmit App-Generated Wireless Waveform Using Radio Transmitters.

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

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

Bluetooth LE Waveform Generator app

Open the Bluetooth LE Waveform Generator App

MATLAB Toolstrip: On the Apps tab, under Signal Processing and Communications, click the app icon. Icon to configure wireless waveform generator for Bluetooth low energy waveform generation.

MATLAB Command Prompt: Enter wirelessWaveformGenerator. This command opens the Wireless Waveform Generator app. To configure the app for Bluetooth LE waveform generation, in the Waveform Type section, select Bluetooth Low Energy.

Examples

expand all

Generate Bluetooth® low energy (LE) waveforms by using the Bluetooth LE Waveform Generator app.

Open Bluetooth LE Waveform Generator App

On the Apps tab of the MATLAB® toolstrip under Signal Processing and Communication, select the Bluetooth Low Energy app icon. This opens the Wireless Waveform Generator app configured for Bluetooth LE waveform generation.

Generate Bluetooth LE Waveform

To generate a Bluetooth LE waveform, perform these steps.

  1. Select the PHY Data rate of the Bluetooth LE waveform you want to generate. The app enables you to generate Bluetooth LE waveforms with PHY data rates of 2 Mbps, 1 Mbps, 500 Kbps, or 125 Kbps.

  2. Specify the Samples per symbol, Channel index, and Access address values.

  3. Enable or disable the Data whitening option.

  4. Specify the Modulation index and Pulse length values.

  5. Specify the Bit source value.

  6. To visualize the waveform, click Generate.

For example, this figure shows the Time Scope, Spectrum Analyzer, Constellation Diagram, and Eye Diagram visualization results for a Bluetooth LE waveform generated by using random input bits at a data rate of 2 Mbps.

Export Generated Waveform

You can export the generated waveform and its parameters by clicking Export. You can export the waveform as one of these options.

  • A MATLAB script with the .m extension, which you can run to generate the waveform without the app

  • A file with a .bb, .mat, or .txt extension

  • Your MATLAB workspace, as a structure

  • A Simulink block, which you can use to generate the waveform in a Simulink model without the app

Transmit Bluetooth LE Waveform

Transmitting waveforms requires a license for Instrument Control Toolbox™. To transmit a generated waveform, click the Transmitter tab on the app toolstrip and configure the instruments. You can use any instrument supported by the rfsiggen function.

The Bluetooth LE Waveform Generator app enables you to generate a Bluetooth LE RF PHY test waveform, as specified in the Bluetooth Core Specifications 5.3, Bluetooth Test Suite, RFPHY.

Open Bluetooth LE Waveform Generator App

On the Apps tab of the MATLAB toolstrip, under Signal Processing and Communication, select the Bluetooth Low Energy app icon. This opens the Wireless Waveform Generator app, configured for Bluetooth LE waveform generation.

Generate and Visualize Bluetooth LE RF PHY Test Waveform

To configure a Bluetooth LE RF PHY test waveform, select from the Waveform Type section of the app toolstrip. Generate a Bluetooth LE RF PHY test waveform by performing these steps in the Waveform pane.

  1. Select the type of Bluetooth LE RF PHY test waveform you want to generate. The app enables you to generate Bluetooth LE RF PHY Transmitter and Receiver tests.

  2. Specify the Test name value as Output power, Inband emissions, Carrier frequency offset and drift, Modulation characteristics, IQ samples coherency, IQ samples dynamic range, Intermodulation performance, Blocking performance, or C/I performance.

  3. Specify the Test case ID value corresponding to the Test name.

  4. Specify your values for Modulation index, Samples per symbol, and Pulse length.

  5. Specify the Payload length and Payload type values for the bit source.

  6. To generate and visualize the waveform, on the app toolstrip, select Generate.

This figure shows the Time Scope, Spectrum Analyzer, Constellation Diagram, and Eye Diagram visualization results for a Bluetooth LE RF PHY transmitter test waveform for the Inband emissions test.

Impair Waveform

Impair the generated Bluetooth LE RF PHY test waveform by performing these steps.

  1. Select Impairments from the Generation section of the app toolstrip.

  2. Select the impairments that you want to add to the generated waveform. The app enables you to add additive white Gaussian noise (AWGN), phase offset, frequency offset, phase noise, DC offset, IQ imbalance, and memoryless cubic nonlinearity as impairments to the generated waveform.

  3. To generate and visualize the impaired waveform, on the app toolstrip, select Generate.

Export Waveform

To export the generated waveform and its parameters, on the app toolstrip, select Export. You can export the waveform as one of these options.

  • Export to a MATLAB script file with the .m extension, which you can run to generate the waveform without the app.

  • Export to a file with a .bb, .mat, or .txt extension.

  • Export to your MATLAB workspace, as a structure.

  • Export to a Simulink block, which you can use to generate the waveform in a Simulink model without the app.

The Bluetooth LE Waveform Generator app enables you to generate a Bluetooth LE direction-finding waveform, as specified in the Bluetooth Core Specifications 5.1.

Open Bluetooth LE Waveform Generator App

On the Apps tab of the MATLAB toolstrip under Signal Processing and Communication, select the Bluetooth Low Energy app icon. This opens the Wireless Waveform Generator app, configured for Bluetooth LE waveform generation.

Generate and Visualize Bluetooth LE Direction-Finding Waveform

To generate a Bluetooth LE direction-finding waveform, perform these steps in the Waveform pane.

  1. Select the PHY Data rate of the Bluetooth LE direction-finding waveform you want to generate. The app enables you to generate Bluetooth LE waveforms with PHY data rates of 2 Mbps, 1 Mbps, 500 Kbps, or 125 Kbps.

  2. Specify your values for Samples per symbol, Channel index, and Access address.

  3. Select Direction finding (DF) packet.

  4. Set the DF packet type value to Connectionless CTE or Connection CTE.

  5. Specify your values for Modulation index and Pulse length.

  6. Specify the Bit source value.

  7. To visualize the waveform, in the app toolstrip, select Generate.

For example, this figure shows the Time Scope, Spectrum Analyzer, Constellation Diagram, and Eye Diagram visualization results for a Bluetooth LE direction-finding waveform generated for a connection CTE packet by using random input bits at a data rate of 1 Mbps.

Impair Waveform

Impair the generated Bluetooth LE direction-finding waveform by performing these steps.

  1. On the Generator tab, in the Generation section, select Impairments.

  2. Select the impairments that you want to add to the generated waveform. The app enables you to add additive white Gaussian noise (AWGN), phase offset, frequency offset, phase noise, DC offset, IQ imbalance, and memoryless cubic nonlinearity as impairments to the generated waveform.

  3. Visualize the impaired waveform by clicking Generate.

Export Waveform

To export the generated waveform and its parameters, select Export. You can export the waveform as one of these options.

  • A MATLAB script with the .m extension, which you can run to generate the waveform without the app

  • A file with a .bb, .mat, or .txt extension

  • Your MATLAB workspace, as a structure

  • A Simulink block, which you can use to generate the waveform in a Simulink model without the app

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.

References

[1] Bluetooth Technology Website. “Bluetooth Technology Website | The Official Website of Bluetooth Technology.” Accessed November 28, 2022. https://www.bluetooth.com/.

[2] Bluetooth Special Interest Group (SIG). "Bluetooth Core Specification." Version 5.1. https://www.bluetooth.com/.

[3] Bluetooth Special Interest Group (SIG). "Bluetooth Core Specification." Version 5.3. https://www.bluetooth.com/.

[4] Bluetooth Special Interest Group (SIG). "Radio Frequency Physical Layer (RF PHY)." "Bluetooth Core Specification." Version 5.3. Bluetooth Test Suite, RFPHY.TS.p20 edition 2. Revision date August 23, 2023https://www.bluetooth.com/.

Version History

Introduced in R2022a

expand all