Explore Bluetooth LE and WLAN Coexistence in 6 GHz with LBT
This example shows how to simulate the noncollaborative coexistence of Bluetooth® low energy (LE) and WLAN in 6 GHz with configurable inter frame space (IFS) values and channel access mechanisms such as listen before talk (LBT), spectrum sensing based deferral (SSBD), and detect and avoid (DAA).
Using this example, you can:
Create and configure a noncollaborative coexistence scenario consisting of a Bluetooth connected isochronous stream (CIS) LE Audio and WLAN network, both operating in 6 GHz.
Configure LBT or SSBD channel access mechanisms at the Bluetooth LE 6 GHz node.
Visualize the packet communication in the time and frequency domains for all the nodes.
Simulate and analyze the performance of each node, such as packet loss ratio (PLR), throughput, and average application latency.
Additionally, you can use this example script to perform these tasks.
Channel Access Mechanisms (LBT, SSBD, DAA) for Bluetooth LE and WLAN Coexistence in 6 GHz
You can mitigate the interference between Bluetooth and WLAN by using two types of coexistence mechanisms: noncollaborative and collaborative. Noncollaborative coexistence mechanisms do not exchange information between two wireless networks. Collaborative coexistence mechanisms collaborate and exchange network-related information between two wireless networks. For more information about coexistence between Bluetooth and WLAN, see Bluetooth-WLAN Coexistence.
When both Bluetooth and WLAN operate in the 6 GHz band, interference occurs due to overlapping frequencies. WLAN, operating at a higher bandwidth, shows a significantly reduced power spectral density (PSD) compared to Bluetooth LE at the same power level, resulting in Bluetooth having a significant effect on WLAN. Employing channel access mechanisms enables you to manage how multiple devices share the communication medium. These mechanisms ensure efficient data transmission and prevent collisions. In Bluetooth-WLAN coexistence scenarios, common channel access mechanisms include clear channel assessment (CCA) and time-division multiplexing. This example uses the LBT, SSBD, and DAA channel access mechanisms for Bluetooth, whereas WLAN uses carrier sense multiple access with collision avoidance (CSMA/CA) to prevent collisions [5] [6].
LBT — In this mechanism, the node determines the availability of the channel for a CCA duration before transmission. If the energy in the channel is below the energy detection (ED) threshold, the node determines the channel is idle and transmits the packet in the connection event. Otherwise, the node closes the connection event and retries the packet transmission in the next connection event. The node configures the IFS values between packets from the Central to the Peripheral node (T_IFS_ACL_CP) and from the Peripheral to the Central node (T_IFS_ACL_PC) by using the TIFS configuration specified in Bluetooth Core Specification v6.0 [2]. This image shows the LBT mechanism across multiple connection events for different channel conditions.
SSBD — This mechanism uses channel sensing through CCA and implements bounded deferral with a linearly increasing random backoff at each deferral. The linear backoff effectively reduces latency and jitter. Additionally, an optional persistence mechanism effectively addresses packet transmission failures. This image shows the SSBD mechanism across a connection event for different channel conditions.
DAA — This mechanism reduces interference by avoiding the use of frequencies once it detects other transmissions on those frequencies. In this example, the DAA mechanism classifies the channels as good or bad and updates the channel map periodically based on the decoding status of the received packets.
Noncollaborative Coexistence Scenario
This figure shows the noncollaborative coexistence scenario that this example simulates.
The scenario consists of these networks in an environment configured by using a free space path loss (FSPL) model.
Bluetooth LE Network — This network includes a mobile phone serving as the Bluetooth LE Central node and two earbuds acting as Bluetooth LE Peripheral nodes. All Bluetooth LE nodes operate in the 6 GHz band across 37 channels, with center frequencies ranging from 5945 MHz to 6017 MHz. Each channel has a bandwidth of 2 MHz. The source node transmits distinct left and right audio streams to the respective left and right Peripheral LE nodes. Initially, the source node establishes asynchronous connection-oriented (ACL) links with both Peripheral nodes. The Central node and connected Peripheral nodes constitute a Bluetooth LE piconet. The source node transmits control data for audio streaming over these ACL links by using connection events. The source node sends an audio stream to each earbud through their respective CIS events. For more information about CIS events, refer to Bluetooth LE Audio.
WLAN Network — This network includes a WiFi® Router (WLAN AP) and a laptop (WLAN STA). The AP and STA exchange data traffic whenever they successfully access the channel through contention.
Check for Support Package Installation
Check if the Communications Toolbox™ Wireless Network Simulation Library support package is installed. If the support package is not installed, MATLAB® returns an error with a link to download and install the support package.
wirelessnetworkSupportPackageCheck
Create and Configure Scenario
Set the random number generator to 1 to ensure the repeatability of results. The seed value controls the pattern of random number generation. Initializing the random number generator using the same seed ensures the same result. To improve the accuracy of your simulation results, after running the simulation, you can change the seed value, run the simulation again, and average the results over multiple simulations.
rng(1,"twister")
Create a wireless network simulator object. Specify the simulation time in seconds.
networkSimulator = wirelessNetworkSimulator.init; simulationTime = 1;
Bluetooth LE 6 GHz Network
Create a channel access configuration object to add the selected channel access mechanism channelAccess
to Bluetooth LE 6 GHz nodes. Based on the energy detected during the specified CCA duration, specify the ED threshold to assess whether the channel is busy or idle. To determine whether the node must transmit the packet at the end of the final retry, if you specify the SSBD channel access mechanism, set the MACSSBDBOEndAction
property of the helperBluetoothChannelAccessConfig
helper object to true
.
channelAccess ="LBT"; centralChannelAccessConfig = helperBluetoothChannelAccessConfig( ... ChannelAccessMechanism=channelAccess,MACSSBDBOEndAction=false, ... PHYEDThreshold=-75, ... % In dBm/MHz PHYCCADuration=18e-6); % In seconds
Create a Bluetooth LE 6 GHz node, specifying their roles as "central"
. Specify the names and positions of the Central node. Specify the channel access configuration of the Central node by using the ChannelAccessConfig
property of the helperBluetoothLE6GHzNode
helper object.
central = helperBluetoothLE6GHzNode("central", ... Name="Central", ... Position=[0 2 0], ... % x-, y-, and z-coordinates in meters TransmitterPower=0, ... % In dBm ChannelAccessConfig=centralChannelAccessConfig);
Create two Bluetooth LE 6 GHz nodes, specifying the role as "peripheral"
. Specify the name and position of the nodes. To add a channel access configuration to a Peripheral node, specify the ChannelAccessConfig
property of the corresponding helperBluetoothChannelAccessConfig
helper object. If you do not specify the ChannelAccessConfig
property, the object does not add a channel access mechanism to the node.
leftPeripheral = helperBluetoothLE6GHzNode("peripheral", ... Name="LeftPeripheral", ... Position=[-0.5 2 0], ... % x-, y-, and z-coordinates in meters TransmitterPower=0); % In dBm rightPeripheral = helperBluetoothLE6GHzNode("peripheral", ... Name="RightPeripheral", ... Position=[0.5 2 0], ... % x-, y-, and z-coordinates in meters TransmitterPower=0); % In dBm
Create a Bluetooth LE CIS configuration object, specifying the isochronous (ISO) interval and number of subevents. To set the timing of the ACL and CIS events, specify these values.
Connection interval — This value specifies the time between the successive anchor points of the connection events.
ISO interval — This value specifies the time between the successive anchor points of a CIS.
To stream CIS events, establish an ACL link from the source to both the left and right peripherals. Transmit control data for audio streaming over the ACL logical transport using the connection events. To transmit audio data through the CIS events, use the CIS logical transport.
cisCfg = bluetoothLECISConfig( ... ISOInterval=10e-3, ... % In seconds NumSubevents=3, ... FlushTimeout=1, ... SubInterval=2.5e-3, ... % In seconds CISArrangement="interleaved", ... MaxPDU=[125 0]); % In bytes
Create a Bluetooth LE connection configuration object by using the helperBluetoothLE6GHzConnectionConfig
helper object. Specify the connection interval and active period for the ACL connection. The ACL connection active period impacts the CIS event active period. This example supports only 37 channels within the 6 GHz frequency range, with center frequencies ranging from 5945 MHz to 6017 MHz. Each channel has a bandwidth of 2 MHz.
connectionConfig = helperBluetoothLE6GHzConnectionConfig( ... ConnectionInterval=20e-3, ... % In seconds ActivePeriod=1e-3, ... % In seconds MaxPDU=27, ... % In bytes UsedChannels=0:36, ... SupervisionTimeout=32, ... % In seconds AccessAddress="EDD210B2", ... PHYMode="LE2M");
Specify the IFS duration.
connectionConfig.TIFS = 100e-6; % In seconds connectionConfig.TMCES = 100e-6; % In seconds
Configure the ACL and CIS connections between the source and the left Peripheral. Set the connection offset for the left Peripheral to 0 seconds, ensuring its connection events occur at the start of the simulation. Schedule the CIS events for the left Peripheral to occur at the end of its active period within the ACL connection. Additionally, ensure both the ACL and CIS connection events occur at regular intervals.
[updatedConnCfgLeft,updatedCISCfgLeft] = ...
configureConnection(connectionConfig,central,leftPeripheral,CISConfig=cisCfg);
Configure the ACL and CIS connections between the source and the right Peripheral. The connection events for the right Peripheral occur at the specified connection offset by using the start of the simulation as the reference point. The CIS events for the right Peripheral occur at the end of the first CIS event of the left Peripheral.
connectionConfig.AccessAddress = "3AB81997"; connectionConfig.ConnectionOffset = 10e-3; % In seconds [updatedConnCfgRight,updatedCISCfgRight] = ... configureConnection(connectionConfig,central,rightPeripheral,CISConfig=cisCfg);
Create a networkTrafficOnOff
object to generate an On-Off application traffic pattern. Configure the On-Off application traffic pattern at the left Peripheral and right Peripheral by specifying the application data rate, packet size, and on and off state durations.
leftPeripheralTraffic = networkTrafficOnOff( ... DataRate=100, ... % In Kbps PacketSize=125, ... % In bytes OnTime=Inf, ... % In seconds OffTime=0); % In seconds rightPeripheralTraffic = networkTrafficOnOff( ... DataRate=100, ... PacketSize=125, ... OnTime=Inf, ... OffTime=0);
Add application traffic between the source node and both Peripheral nodes.
addTrafficSource(central,leftPeripheralTraffic,DestinationNode=leftPeripheral,CISConfig=updatedCISCfgLeft) addTrafficSource(central,rightPeripheralTraffic,DestinationNode=rightPeripheral,CISConfig=updatedCISCfgRight)
Create a Bluetooth LE network consisting of the source node and the Peripheral nodes. Add the Bluetooth LE nodes to the wireless network simulator.
bluetoothLENodes = [central leftPeripheral rightPeripheral]; addNodes(networkSimulator,bluetoothLENodes)
WLAN Network
To enable the WLAN network, set the enableWLANNetwork
flag to true
.
enableWLANNetwork =
true;
Specify the operating frequency band, in GHz, and the channel number.
if enableWLANNetwork
bandAndChannel = [6 1];
Create a WLAN device configuration for an AP and an STA by using the wlanDeviceConfig
(WLAN Toolbox) object. Set the properties of the AP and STA device configurations.
apDeviceConfig = wlanDeviceConfig(Mode="AP",BandAndChannel=bandAndChannel,ChannelBandwidth=20e6, ... MCS=2,MPDUAggregationLimit=256,TransmitPower=14,InterferenceModeling="overlapping-adjacent-channel"); staDeviceConfig = wlanDeviceConfig(Mode="STA",BandAndChannel=bandAndChannel,ChannelBandwidth=20e6, ... MPDUAggregationLimit=256,MCS=2,TransmitPower=14,InterferenceModeling="overlapping-adjacent-channel");
From the specified configuration, create an AP node and an STA node by using the wlanNode
(WLAN Toolbox) object. Specify the names and positions of the nodes. Disable the medium access control (MAC) and physical layer (PHY) abstraction.
wlanAPNode = wlanNode(DeviceConfig=apDeviceConfig, ... Name="AP", ... Position=[0 5 0], ... PHYAbstractionMethod="none", ... MACFrameAbstraction=false); wlanSTANode = wlanNode(DeviceConfig=staDeviceConfig, ... Name="STA", ... Position=[0 0 0], ... PHYAbstractionMethod="none", ... MACFrameAbstraction=false);
Associate the STA to the AP node.
associateStations(wlanAPNode,wlanSTANode,BandAndChannel=[6 1],FullBufferTraffic="on")
Add the WLAN nodes to the wireless network simulator.
wlanNodes = [wlanAPNode wlanSTANode];
addNodes(networkSimulator,wlanNodes)
end
nodes = networkSimulator.Nodes;
Configure Packet and Node Performance Visualization
To visualize packet communication in the Bluetooth LE and WLAN network, set the enablePacketVisualization
flag to true
. The visualization shows these plots:
Packet communication over the time and frequency domains
State transitions of Bluetooth and WLAN packets, for each node, over time
At the end of the simulation, you can visualize packets at any time instance.
enablePacketVisualization =
true;
Initialize the visualization by using the helperPlotPacketTransitions
helper object.
if enablePacketVisualization visObj = helperPlotPacketTransitions(nodes,simulationTime); end
Initialize the node performance plot by using the helperPerformanceViewer
helper object. This helper object uses the statistics
object function of the bluetoothLENode
object to calculate the PLR, latency, and throughput. Additionally, the helper object stores the latency of each packet in an array in the PacketLatencyVal
property.
performancePlotObj = helperPerformanceViewer(nodes,simulationTime);
Simulation and Results
Run the simulation for the specified time and generate these results:
A runtime plot for all the nodes, showing the state transitions and packet transmissions over the time and frequency domains.
A bar plot for all the nodes, showing the PLR, throughput, and average application layer (APP) packet latency. You can find these results in the
performancePlotObj
variable.The APP, link layer (LL), and PHY statistics for all the simulated nodes.
In the visualization, observe the channel access executed for the packets according to the configured channel access mechanism at the Bluetooth LE nodes. Additionally, note that the packets are communicated in the 6 GHz band and do not overlap in frequency or time when channel access is enabled, unless the energy in the channel falls below the ED threshold.
This example uses an "fspl
" path loss environment to determine the path loss between the nodes. To use a custom channel model, add it to the network simulator by using the addChannelModel
object function of the wirelessNetworkSimulator
object.
run(networkSimulator,simulationTime)
Retrieve the statistics of all the nodes. For more information about WLAN node statistics, see WLAN System-Level Simulation Statistics (WLAN Toolbox). For more information about Bluetooth LE node statistics, see Bluetooth LE Node Statistics.
le6GHzStats = statistics(bluetoothLENodes); if enableWLANNetwork wlanStats = statistics(wlanNodes); end
To view the node performance visualization, set the enableNodePerformancePlot
flag to true
. This visualization displays the PLR, throughput, and latency of the Bluetooth LE and WLAN nodes. If you enable the LBT or SSBD channel access mechanism, notice the reduced PLR for WLAN. Enabling channel access also affects latency and throughput compared to scenarios without channel access added to the Central node. Adjust the channel access configurations to observe these changes.
enableNodePerformancePlot =true; if enableNodePerformancePlot plotNetworkStats(performancePlotObj) end
Further Exploration
You can use this example to further explore these capabilities.
Analyze Performance of Network For Various Bluetooth Channel Access Mechanisms
To analyze the impact of the LBT and SSBD channel access mechanisms on Bluetooth and WLAN nodes or networks, configure the ChannelAccessConfig
property of helperBluetoothLE6GHzNode
helper object. Additionally, to assess network performance when Bluetooth and WLAN channels have different percentages of overlap in frequency, configure the UsedChannels
property of helperBluetoothLE6GHzConnectionConfig
helper object.
For example, you can simulate this Bluetooth-WLAN noncollaborative coexistence scenario and evaluate the performance of the Bluetooth and WLAN networks as the number of Bluetooth networks increases within the simulation.
Vary the number of Bluetooth LE piconets in the network. Run each simulation by enabling and disabling the channel access mechanisms at the Central node. Set the simulation time to 5 seconds. To view the results, uncomment and run this helper function.
% helperCompareChannelAccessAndOverlapInLE6GHz
By disabling LBT at the Bluetooth nodes, you can observe that Bluetooth induces high packet loss, reduced throughput, and increased latency in WLAN. If you enable LBT, interference in WLAN decreases, but Bluetooth experiences reduced throughput and increased latency due to fewer opportunities to transmit packets compared to when LBT is disabled. You can observe similar performance outcomes with LBT and SSBD channel access mechanisms. SSBD shows higher latency and slightly lower throughput than LBT because it listens longer, capturing packets from other nodes on the same channel. To ensure coexistence between Bluetooth and WLAN with minimal degradation at both nodes, configure the channel access mechanisms to suit your specific environment and application. You can adjust the channel access configuration properties using the helperBluetoothChannelAccessConfig
helper object and rerun the simulation. Additionally, increasing the number of Bluetooth piconets increases interference in WLAN, leading to higher packet loss rates and reduced throughput.
Simulate DAA Channel Access Mechanism with Channel Map Update Procedure at LE Node
To implement the DAA channel access mechanism, you must update the channel map at the Bluetooth LE nodes based on the received packet status at the receiver by performing these steps:
Create a custom channel classification object. Classify the channels by passing the classification function at a specific simulation time or periodicity by using the
scheduleAction
object function of thewirelessNetworkSimulator
object.Implement a custom channel classification by classifying the channels based on the status of the received packets.
Update the status of the received packets and classify the channels accordingly. Use the
updateChannelList
object function of thebluetoothLENode
object to update the channel list of Bluetooth LE nodes.To visualize the channel classification at the Bluetooth nodes over time, initialize the
helperVisualizeClassification
helper object at the start of the simulation.
For more information about how to add channel classification for Bluetooth nodes, see the Noncollaborative Bluetooth LE Coexistence with WLAN Signal Interference example. To view the results of the simulated example noncollaborative coexistence scenario, uncomment and run this helper function.
% helperCompareLBTVsDAAIn6GHz
By enabling DAA, you can observe slightly higher PLR than LBT primarily because initial packet transmissions face greater failure rates over Bluetooth. However, Bluetooth experiences slightly reduced latency due to successful packet reception, facilitated by retransmissions at the CIS. Despite these differences, the throughputs of LBT and DAA remain relatively comparable across both Bluetooth and WLAN.
Simulate Custom Channel Access Mechanism
To add your own custom channel access mechanism at the Bluetooth LE 6 GHz node LL, perform these steps.
Create a new custom channel access function,
customChannelAccess
, in thehelperBluetoothChannelAccessMechanisms
helper object.To verify channel availability before transmission, in the
helperLLConnections
helper object, modify the respective object functions calls to replaceccaMode1Operation
andssbdOperation
with your custom function.If the channel is available, proceed with transmission. Otherwise, implement your custom logic.
To modify the CIS LL, apply similar updates to the
helperLLConnectedIsochronousGroup
helper object.
Visualize P95 and P99 Latency at Bluetooth and WLAN Nodes
To configure and visualize the P95 and P99 latency at the Bluetooth and WLAN nodes, specify the LatencyMetric
argument of the averageReceiveLatency
object function of the helperPerformanceViewer
helper object as "P95
" or "P99
", respectively. The P95 and P99 latency metrics represent the time thresholds below which 95% and 99% of all the received packets latency values fall, respectively. To view the P95 latency of packets received at the left Peripheral LE node, uncomment and run this code.
% averageReceiveLatency(performancePlotObj,2,"P95")
Appendix
The example uses these helpers:
helperBluetoothLE6GHzNode
— Bluetooth LE 6 GHz nodehelperBluetoothChannelAccessConfig
— Bluetooth channel access configuration parametershelperBluetoothChannelAccessMechanisms
— Bluetooth channel access mechanismshelperBluetoothLE6GHzConnectionConfig
— Bluetooth LE 6 GHz connection configuration objecthelperLEPHYReceiver
— Bluetooth LE 6 GHz node PHY receiverhelperLLConnections
— Bluetooth LE 6 GHz LL connections objecthelperLLConnectedIsochronousGroup
— Bluetooth LE 6 GHz LL CIS objecthelperPerformanceViewer
—helperCompareChannelAccessAndOverlapInLE6GHz
— Visualize the impact of Bluetooth 6 GHz piconets on channel access mechanismshelperCompareLBTVsDAAIn6GHz
— Compare LBT and DAA channel access mechanismshelperBluetoothChannelClassification
— Create an object to classify Bluetooth channels
References
Bluetooth Technology Website. “Bluetooth Technology Website | The Official Website of Bluetooth Technology.” Accessed 15 Dec. 2024. https://www.bluetooth.com/.
Bluetooth Core Specifications Working Group. "Bluetooth Core Specification". Version 6.0. https://www.bluetooth.com/specifications/specs/core-specification-6-0/.
Institute of Electrical and Electronics Engineers (IEEE). “IEEE Recommended Practice for Information Technology -- 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.” IEEE Standard 802.15.2. IEEE, August 28, 2003. https://doi.org/10.1109/IEEESTD.2003.94386.
Institute of Electrical and Electronics Engineers (IEEE). "IEEE Standard for Information Technology--Telecommunications and Information Exchange between Systems Local and Metropolitan Area Networks--Specific Requirements Part 11: Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications Amendment 1: Enhancements for High-Efficiency WLAN." IEEE 802.11ax-2021. IEEE, May 19, 2021. https://doi.org/10.1109/IEEESTD.2021.9442429.
"IEEE Standards Association - Documents." Accessed 15 Dec. 2024. https://mentor.ieee.org/802.11/documents?is_dcn=DCN%2C%20Title%2C%20Author%20or%20Affiliation&is_group=coex.
"IEEE Standards Association - Documents." Accessed 15 Dec. 2024. https://mentor.ieee.org/802.15/documents?is_dcn=DCN%2C%20Title%2C%20Author%20or%20Affiliation&is_group=04ab.
ETSI EN 300 328 V2.2.2 (2019-07). Wideband transmission systems; Data transmission equipment operating in the 2,4 GHz band; Harmonised Standard for access to radio spectrum. Accessed 15 Dec. 2024. https://www.etsi.org/deliver/etsi_en/300300_300399/300328/02.02.02_60/en_300328v020202p.pdf.
ETSI EN 303 987 V1.1.1 (2023-06). Wideband transmission systems; Data transmission equipment operating in the 2,4 GHz band; Harmonised Standard for access to radio spectrum. Accessed 15 Dec. 2024. https://www.etsi.org/deliver/etsi_en/303600_303699/303687/01.01.01_60/en_303687v010101p.pdf.
See Also
Objects
wirelessNetworkSimulator
|bluetoothLENode
|bluetoothLECISConfig
|networkTrafficOnOff
|wlanNode
(WLAN Toolbox) |wlanDeviceConfig
(WLAN Toolbox)