Main Content

Estimate Packet Delivery Ratio of LE Broadcast Audio in Residential Scenario

This example shows you how to estimate the packet delivery ratio (PDR) of Bluetooth low energy (LE) audio isochronous broadcast streams in a residential scenario by using the Bluetooth® Toolbox.

Using this example, you can:

  • Create and configure a residential scenario to simulate Bluetooth LE audio broadcast network.

  • Configure the broadcast isochronous group (BIG) parameters at the broadcasters and receivers.

  • Add a custom path loss model to the wireless channel.

  • Add WLAN interference and explore the performance of the LE audio broadcast network with and without WLAN interference.

  • Visualize PDR at different receiver locations in the residential scenario through a heatmap.

Isochronous Broadcasting in LE Audio

The Bluetooth Core Specification 5.2 [2] defined by the Special Interest Group (SIG) enhances LE audio technology by adding the functionality to broadcast one or more audio streams to an unlimited number of audio receiver nodes in LE audio. To implement this functionality, the Bluetooth Core Specification 5.2 [2] defines a new state, isochronous broadcasting, to the link layer (LL) state machine. In the isochronous broadcasting state, the LL transmits the isochronous data packets on an isochronous physical channel. If a Bluetooth LE node is in the isochronous broadcasting state then it is called as an isochronous broadcaster.

To realize connectionless broadcast isochronous communication, the Bluetooth Core Specification 5.2 [2] defines broadcast isochronous streams (BIS) and broadcast isochronous group (BIG) events. A BIS is a logical transport that enables a Bluetooth LE node to transfer isochronous data (framed or unframed). A BIG contains one or more BISes that have the same isochronous interval.

For more information about BIS and BIG events, see Bluetooth LE Audio.

Residential Scenario Description

This example demonstrates a system-level simulation to evaluate the performance of a Bluetooth LE broadcast audio network in a residential scenario. The residential scenario consists of a building with two floors. This figure shows the residential scenario simulated in this example.

These are the characteristics of the residential scenario:

  • Each floor consists of four rooms, each having dimensions 8 m x 8 m x 3 m.

  • The building has one broadcaster, five receivers, and one WLAN interferer, placed in random x- and y- locations at a height of 1.5 meters from the floor.

  • Each receiver is synchronized to the broadcaster.

Configure Simulation Parameters

Set the seed for the random number generator to 1 to ensure repeatability of results. The seed value controls the pattern of random number generation. For high fidelity simulation results, change the seed value and average the results over multiple simulations.


Residential Scenario

The scenario structure defines the size and layout of the residential building by using these parameters.

  • BuildingLayout - Specifies the number of rooms along the length, breadth, and height of the building.

  • RoomSize - Specifies the size of each room in meters.

scenario = struct;
scenario.BuildingLayout = [2 2 2];
scenario.RoomSize = [8 8 3];        % In meters

Initialize Broadcaster Nodes

Set the position of the broadcaster in the network.

broadcasterPosition = [2 2 1.5];   % x-, y-, and z- coordinates in meters

Create a Bluetooth LE node with the role set to isochronous-broadcaster. Specify the transmitter properties.

broadcasterNode = bluetoothLENode("isochronous-broadcaster");
broadcasterNode.Name = "Broadcaster";
broadcasterNode.Position = broadcasterPosition(1,:);
broadcasterNode.TransmitterPower = 10                         % In dBm
broadcasterNode = 
  bluetoothLENode with properties:

        TransmitterPower: 10
         TransmitterGain: 0
           ReceiverRange: 100
            ReceiverGain: 0
     ReceiverSensitivity: -100
             NoiseFigure: 0
    InterferenceFidelity: 0
                    Name: 'Broadcaster'
                Position: [2 2 1.5000]

   Read-only properties:
                    Role: 'isochronous-broadcaster'
               BIGConfig: [1x1 bluetoothLEBIGConfig]
          TransmitBuffer: [1x1 struct]
                      ID: 22

Initialize Receiver Nodes

Specify the number of receivers and their respective positions in the network.

numReceivers = 5;
receiverPositions = [9 7 4.5; ...
    4 4 4.5; ...
    12 12 4.5; ...
    3 3 1.5; ...
    14 12 1.5];                     % x-, y-, and z- coordinates in meters

Create Bluetooth LE nodes with the role set as synchronized-receiver.

receiverNodes = cell(1,numReceivers);
for rxIdx = 1:numReceivers
    rxNode = bluetoothLENode("synchronized-receiver");
    rxNode.Name = ['Receiver ' num2str(rxIdx)];
    rxNode.Position = receiverPositions(rxIdx,:);
    receiverNodes{rxIdx} = rxNode;

Configure BIG parameters

Create a Bluetooth LE BIG configuration object with default BIG parameters.

cfgBIG = bluetoothLEBIGConfig
cfgBIG = 
  bluetoothLEBIGConfig with properties:

        SeedAccessAddress: '78E52493'
                  PHYMode: 'LE1M'
                   NumBIS: 1
              ISOInterval: 0.0050
               BISSpacing: 0.0022
              SubInterval: 0.0022
                   MaxPDU: 251
              BurstNumber: 1
    PretransmissionOffset: 0
          RepetitionCount: 1
             NumSubevents: 1
           BISArrangement: 'sequential'
                BIGOffset: 0
        ReceiveBISNumbers: 1
             UsedChannels: [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ... ]
            InstantOffset: 6
    BaseCRCInitialization: '1234'

Assign the configuration to the broadcaster and receiver nodes.

for rxIdx = 1:numReceivers

Add Application Traffic to Broadcaster

Attach application traffic source to the broadcaster node. Configure the on-off application traffic pattern, by using the networkTrafficOnOff object, at the broadcaster node by specifying the application data rate, packet size, and on and off state duration.

trafficSource = networkTrafficOnOff(OnTime=inf,DataRate=500,PacketSize=cfgBIG.MaxPDU, ...
    GeneratePacket=true,ApplicationData=randi([0 255], 100, 1));
addTrafficSource(broadcasterNode, trafficSource);

WLAN Signal Interference

To add WLAN signal interference, enable the wlanInterference parameter.

wlanInterference = true;

The interfering WLAN nodes add interference in the Bluetooth network by transmitting WLAN signals periodically based on the configuration. They do not model the physical layer (PHY) and MAC behavior of WLAN.

Set the properties of the interfering WLAN nodes. Specify the source of WLAN interference by using the WaveformSource parameter of the helperInterferingWLANNode helper function. Specify the source of the WLAN interference by using one of these options.

  • 'Generated' - To add a WLAN Toolbox™ signal to interfere the communication between Bluetooth nodes, select this option. For more information about how to add WLAN signal interference generated using the WLAN Toolbox features, see Add WLAN Signal Using WLAN Toolbox Features.

  • 'BasebandFile' - To add a WLAN signal from a baseband file (.bb) to interfere the communication between Bluetooth nodes, select this option. You can specify the file name using the BasebandFile parameter. If you do not specify the .bb file, the example uses the default .bb file, '', to add the WLAN signal.

if wlanInterference            
    wlanNode = helperInterferingWLANNode;
    wlanNode.Name = "WLAN node";
    wlanNode.Position = [14 14 6];         % x-, y- and z- coordinates in meters
    wlanNode.TransmitterPower = 5;         % In dBm

Create and Simulate Broadcast Isochronous Network

Create a broadcast isochronous network consisting of the LE audio broadcast nodes and WLAN interfering nodes (if present).

nodes = [{broadcasterNode} receiverNodes];
if wlanInterference
    nodes = [nodes {wlanNode}];

Initialize the broadcast isochronous network.

networkSimulator = helperWirelessNetwork(nodes);

Visualize the Network

Create the building triangulation from the scenario parameters.

buildingTriangulation = hTGaxResidentialTriangulation(scenario);

Visualize the residential scenario in 3-D.

    ["Bluetooth LE Broadcaster","Bluetooth LE Receiver","Interfering WLAN node"],...
    "Bluetooth LE Broadcast Audio Network in a Residential scenario");

Figure contains an axes object. The axes object with title Bluetooth LE Broadcast Audio Network in a Residential scenario contains 5 objects of type patch, line, scatter. These objects represent Bluetooth LE Broadcaster, Bluetooth LE Receiver, Interfering WLAN node.

Wireless Channel

Set the customPathlossModel to true to add your own custom path loss model. Specify the function handle of the custom model by using the pathloss parameter. If you set the customPathlossModel to false, the example uses a free-space path loss model.

customPathlossModel = true;

This example uses the TGax residential propagation model [4] to determine pathloss between the nodes. Path loss depends on the number of walls, number of floors, and the distance between nodes. Create a path loss model by using the hTGaxResidentialPathLoss helper function. Obtain the path loss between each pair of nodes in the network by using a function handle. Add a residential path loss model to the simulator.

if customPathlossModel
    propModel = hTGaxResidentialPathLoss(Triangulation=buildingTriangulation,...
        FacesPerWall=1);                                          % Propagation model
    pathloss = helperGeneratePathLossTable(propModel,nodes);      % Pathloss function

Run the Simulation

Set the simulation time in seconds.

simulationTime = 1;

Run all the nodes in the network for the specified simulation time.


Simulation Results

At each receiver node, the simulation measures these metrics:

  • PDR

  • Average LL packet latency

  • LL throughput

  • Packet statistics at PHY and LL

  • Time spent in listen state and sleep state

View the table of statistics by using the helperBLEBIGStatistics helper function.

receiverStatistics = helperBLEBIGStatistics(nodes)
receiverStatistics=5×17 table
                      Position         PDR     LL Average Packet Latency (seconds)    Successful Data Packets    Received Signals    Total Signals with Collision    Signals with Co-channel Interference    Successful Control Packets    Empty Packets    Duplicate Packets    PHY Decoding Failures    Invalid Access Address    Invalid Payload Length    CRC Failures    Listen Time (seconds)    Sleep Time (seconds)    Standby Time (seconds)
                  ________________    _____    ___________________________________    _______________________    ________________    ____________________________    ____________________________________    __________________________    _____________    _________________    _____________________    ______________________    ______________________    ____________    _____________________    ____________________    ______________________

    Receiver 1     9      7    4.5     0.74                 0.002089                            148                    200                        61                                  61                                 0                       0                  0                      3                        37                        0                    12                0.4178                     0                      0.5802        
    Receiver 2     4      4    4.5    0.965                 0.002089                            193                    200                        61                                  61                                 0                       0                  0                      0                         7                        0                     0                0.4178                     0                      0.5802        
    Receiver 3    12     12    4.5     0.67                 0.002089                            134                    200                        61                                  61                                 0                       0                  0                      8                        58                        0                     0                0.4178                     0                      0.5802        
    Receiver 4     3      3    1.5     0.83                 0.002089                            166                    200                        61                                  61                                 0                       0                  0                      0                        34                        0                     0                0.4178                     0                      0.5802        
    Receiver 5    14     12    1.5    0.965                 0.002089                            193                    200                        61                                  61                                 0                       0                  0                      0                         7                        0                     0                0.4178                     0                      0.5802        

Further Exploration

Add WLAN Signal Using WLAN Toolbox Features

To add a WLAN signal using WLAN Toolbox features, follow these steps:

Set the value of WaveformSource parameter of the helperInterferingWLANNode to 'Generated'.

% wlanNode = helperInterferingWLANNode;
% wlanNode.WaveformSource = 'Generated';

Create a WLAN packet format configuration object and assign it to the node.

% cfgHT = wlanHTConfig("ChannelBandwidth","CBW40");
% wlanNode.FormatConfig = cfgHT;

Set the bandwidth of the signal.

% wlanNode.Bandwidth = 40e6;

Heatmap of PDR

To observe the variation in PDR when a receiver moves within the building, you can run the simulation for different positions of a receiver with a fixed broadcaster. Store the receiver positions in a matrix, receiverPositions, and the corresponding PDR values in a column vector, pdr. Observe the variation of PDR with respect to the distance from the broadcaster by using this code snippet.

% helperVisualizeResidentialScenario(buildingTriangulation,{broadcasterNode;wlanNode},...
%     ["Bluetooth LE Broadcaster","Interfering WLAN node"],...
%     "PDR Heatmap at Different Receiver Locations in the Residential scenario");
% pdr = receiverStatistics.PDR;
% plotHeatmap(scenario,receiverPositions,pdr);
% % Function to plot the heatmap of PDR values
% function plotHeatmap(scenario, receiverPositions, pdr)
%     numFloors = scenario.BuildingLayout(3);
%     floorDim = [scenario.RoomSize(1:2).*scenario.BuildingLayout(1:2) scenario.RoomSize(3)]; 
%     floorHeights = scenario.RoomSize(3):scenario.RoomSize(3):scenario.RoomSize(3)*numFloors;
%     % Create x-. and y-axis inputs for surf function
%     [X, Y] = meshgrid(0:1:max(floorDim(1), floorDim(2)));
%     for f = 1:numFloors
%         pdrValues = zeros(size(X));
%         floorIdx = receiverPositions(:,3)>(floorHeights(f)-floorDim(3)) & receiverPositions(:,3)<=floorHeights(f);
%         receiversInFloor = receiverPositions(floorIdx, :);
%         receiversPDR = pdr(floorIdx);
%         for idx = 1:numel(receiversInFloor)/3
%             index = (X == round(receiversInFloor(idx,1)) & Y == round(receiversInFloor(idx,2)));
%             pdrValues(index) = receiversPDR(idx);
%         end
%         Z = (floorHeights(f)-floorDim(3)/2)*ones(size(X));
%         surf(X,Y,Z,pdrValues);
%     end
%     c = colorbar;
%     c.Label.String = 'PDR';
%     colormap('jet');
%     caxis([0 1]);
% end

This heatmap plots the set of PDRs captured at different positions of a receiver.

You can analyze the improvement in PDR in the presence of interference by changing the configuration parameters. To observe an increase in PDR, you can:

  • Increase the transmission power of the broadcaster node by using the TransmitterPower property of the bluetoothLENode object.

  • Increase the number of retransmissions by using the RepetitionCount property of the bluetoothLEBIGConfig object.

  • Create time diversity in the copies of a packet by setting a nonzero pre-transmission offset by using the PretransmissionOffset property of the bluetoothLEBIGConfig object.

  • Avoid hopping to bad channels by setting the good channels using the updateChannelList object function of the broadcaster node.


The example uses these helpers:

Selected Bibliography

[1] Bluetooth Technology Website. “Bluetooth Technology Website | The Official Website of Bluetooth Technology.” Accessed November 10, 2021.

[2] Bluetooth Special Interest Group (SIG). "Bluetooth Core Specification." Version 5.2.

[3] Bluetooth Special Interest Group (SIG). "Bluetooth Core Specification." Version 5.3.

[4] "TGax Channel Models.", doc. IEEE 802.11-14/0882r4.

See Also



Related Topics