Main Content

bluetoothWaveformGenerator

Generate Bluetooth BR/EDR PHY waveform

Since R2020a

    Description

    example

    waveform = bluetoothWaveformGenerator(data,cfgFormat) generates waveform, a multipacket time-domain Bluetooth BR/EDR waveform, for input information bits, data, and a given format configuration, cfgFormat.

    Examples

    collapse all

    Specify the number of HV1 packets.

    numPackets = 10;

    Create a default Bluetooth BR/EDR waveform configuration object. Specify the packet type as HV1.

    cfgWaveform = bluetoothWaveformConfig;
    cfgWaveform.PacketType = 'HV1';

    Create a random input bit vector containing concatenated payloads.

    numBits = getPayloadLength(cfgWaveform)*8*numPackets; % Byte to bit conversion
    dataBits = randi([0 1],numBits,1);

    Set the symbol rate.

    symbolRate = 1e6; % In MHz

    Generate the Bluetooth BR/EDR waveform.

    waveform = bluetoothWaveformGenerator(dataBits,cfgWaveform);

    Create a spectrum analyzer System object to display the frequency spectrum of the generated Bluetooth BR/EDR waveform. Set the sample rate of the frequency spectrum.

    scope = spectrumAnalyzer;
    scope.SampleRate = cfgWaveform.SamplesPerSymbol*symbolRate;

    Plot the Bluetooth BR/EDR waveform.

    scope(waveform);

    Create a default Bluetooth BR/EDR waveform configuration object.

    cfgWaveform = bluetoothWaveformConfig;

    To generate enhanced data rate packet, 2-EV3, specify the packet type as EV3 and the PHY transmission mode as EDRM2.

    cfgWaveform.PacketType = 'EV3';
    cfgWaveform.Mode = 'EDR2M';

    Create a random input bit vector to generate the payload for a single packet.

    numBits = getPayloadLength(cfgWaveform)*8;   % Byte to bit conversion
    dataBits = randi([0 1],numBits,1);

    Generate the Bluetooth BR/EDR waveform.

    txWaveform = bluetoothWaveformGenerator(dataBits,cfgWaveform);

    Input Arguments

    collapse all

    Input information bits, specified as a binary-valued column vector representing multiple concatenated payloads. Specify this input as an exact multiple of the payload length derived from the getPayloadLength object function of the bluetoothWaveformConfig object.

    Data Types: double

    Format configuration object, specified as a bluetoothWaveformConfig object.

    Output Arguments

    collapse all

    Generated time-domain Bluetooth BR/EDR waveform, returned as a complex-valued column vector containing the generated Bluetooth BR/EDR waveform. The function appends this value with zero samples to accommodate a packet-specific slot duration.

    Data Types: double

    References

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

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

    Extended Capabilities

    Version History

    Introduced in R2020a