Main Content

Configure Bluetooth BR/EDR Channel with WLAN Interference and Pass the Waveform Through Channel

Using this example, you can:

  1. Create and configure Bluetooth® basic rate/enhanced data rate (BR/EDR) channel.

  2. Specify the source of WLAN interference as a baseband file or WLAN Toolbox™.

  3. Generate WLAN interference and add it to the Bluetooth BR/EDR channel.

  4. Generate Bluetooth BR/EDR waveform and pass it through the channel.

Create and Configure Bluetooth BR/EDR Channel with WLAN Interference

Configure a Bluetooth BR/EDR channel by using the helperBluetoothChannel object, which creates a Bluetooth BR/EDR channel model object with configurable properties.

bluetoothBREDRChannel = helperBluetoothChannel
bluetoothBREDRChannel = 
  helperBluetoothChannel with properties:

    ChannelIndex: 0
            FSPL: 1
    NodePosition: [0 0 0]
            EbNo: 10
             SIR: 0

Set the ratio of energy per bit to noise power spectral density (Eb/No) for the additive white Gaussian noise (AWGN) channel to 22 dB. Specify signal-to-interference ratio (SIR) as -15 dB.

bluetoothBREDRChannel.EbNo = 22;
bluetoothBREDRChannel.SIR = -15;

Specify the source of WLAN interference by using the wlanInterference property. Use one of these options to specify the source of the WLAN interference.

  • 'Generated': To add a WLAN (802.11b) signal (requires the WLAN Toolbox™ software), select this option.

  • 'BasebandFile': To add a WLAN signal from a baseband file (.bb), select this option. You can specify the file name using the wlanBBFilename input argument. If you do not specify the .bb file, the example uses the default .bb file, 'WLANNonHTDSSS.bb', to add the WLAN signal.

  • 'None': To disable WLAN interference, select this option.

Specify the source of WLAN interference as 'BasebandFile'and specify a baseband file.

wlanInterference = 'BasebandFile';
wlanBBFilename =  'WLANNonHTDSSS.bb';

Generate the WLAN signal interference, by using the helperBluetoothGenerateWLANWaveform function. Add the generated WLAN signal interference to the Bluetooth BR/EDR channel.

if ~strcmpi(wlanInterference,'None')
    wlanWaveform = helperBluetoothGenerateWLANWaveform(wlanInterference,wlanBBFilename);
    addWLANWaveform(bluetoothBREDRChannel,wlanWaveform);
end

Generate and Pass Bluetooth BR/EDR Waveform Through the Channel

Create a Bluetooth BR/EDR signal structure, specifying different configurable properties of the waveform.

bluetoothSignal = struct(...
    'PacketType','DM1',...                      % Packet type
    'Waveform',[],...                           % Waveform
    'NumSamples',[],...                         % Number of samples
    'SampleRate',1e6,...                        % Sample rate
    'SamplesPerSymbol',8,...                    % Samples per symbol
    'Payload',zeros(1,3200), ...                % Payload
    'PayloadLength',0, ...                      % Payload length
    'SourceID',0,...                            % Source identifier
    'Bandwidth',1,...                           % Bandwidth
    'NodePosition',[0 0 0],...                  % Node position
    'CenterFrequency',2402,...                  % Center frequency
    'StartTime',0,...                           % Waveform start time
    'EndTime',0,...                             % Waveform end time
    'Duration',0);...                           % Waveform duration

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

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

Create a bit vector containing concatenated payloads.

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

Generate a Bluetooth BR/EDR waveform.

txWaveform = bluetoothWaveformGenerator(message,cfgWaveform);

Pass the generated waveform through the Bluetooth BR/EDR channel.

bluetoothSignal.Waveform = txWaveform;
bluetoothSignal.NumSamples = numel(txWaveform);
bluetoothSignal = run(bluetoothBREDRChannel,bluetoothSignal,cfgWaveform.Mode);
wirelessWaveform = bluetoothSignal.Waveform;

References

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

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

[3] P802.15.2/D09 - IEEE Draft Recommended Practice for Information Technology Telecommunications and Information Exchange Between Systems Local and Metropolitan Area Networks Specific Requirements - Part 15.2: Coexistence of Wireless Personal Area Networks With Other Wireless Devices Operating in Unlicensed Frequency Bands. LAN/MAN Standards Committee, IEEE Computer Society, 2003, https://ieeexplore.ieee.org/document/4040972.

See Also

Functions

Objects

Related Topics