WLAN Toolbox™ features enable you to create an 802.11ax™ multinode system-level simulation with a full or abstracted model of medium access control (MAC) and physical layer (PHY). At the transmitter and receiver, modeling full MAC processing involves complete MAC frame generation at the MAC layer. Similarly, modeling full PHY processing involves complete operations related to waveform transmission and reception through a fading channel. When you simulate large networks, full MAC and PHY processing is computationally expensive. In an abstracted MAC, the node does not generate or decode any frames at the MAC layer. Similarly, in an abstracted PHY, the node does not generate or decode any waveforms at the PHY. MAC and PHY abstraction enable you to minimize the complexity and duration of the system-level simulations. For more information on PHY abstraction, see the Physical Layer Abstraction for System-Level Simulation and 802.11ax System-Level Simulation with Physical Layer Abstraction examples.
Using this example, you can:
Create and configure a two-node 802.11ax network consisting of one access point (AP) and one station (STA).
Model uplink traffic.
Simulate the network with abstracted MAC and abstracted PHY (of the type
TGax Simulation Scenarios MAC Calibration).
To access the helper files that this example uses, add the
mlWLANSystemSimulation folder to the MATLAB path.
Set the simulation time in milliseconds.
simulationTime = 0.02*1e3;
Specify the total number of nodes (APs and STAs) in the network. This example contains one AP and one STA.
numNodes = 2;
Specify the x-, y-, and z-coordinates of the WLAN nodes in the Cartesian coordinate system. This example considers the first node as the AP and the second node as the STA.
nodePositions = [10 0 0; 20 0 0];
Load the default configuration for the WLAN nodes.
Copy the default configuration for all of the nodes.
nodeConfig = repmat(wlanNodeConfig,1,numNodes);
Initialize the node position of the AP and STAs.
for index = 1:1:numNodes nodeConfig(index).NodePosition = nodePositions(index,:); end
Load the default application traffic configuration for the nodes.
Initialize the node with the traffic configuration by copying the default configuration.
trafficConfig = wlanTrafficConfig;
Configure the uplink traffic at the AP from the STA. Node ID 1 represents the AP, whereas node ID 2 represents the STA.
trafficConfig(1).SourceNode = 2; % STA node ID trafficConfig(1).DestinationNode = 1; % AP node ID
Create WLAN nodes with the specified MAC, PHY, and application traffic configuration by using the
hCreateWLANNodes helper function. By default, the
hCreateWLANNodes helper function configures abstracted MAC and PHY at each WLAN node.
hCreateWLANNodes helper function enables you to switch between abstracted and full MAC or PHY by configuring the
PHYAbstractionType input parameters. The valid values for these parameters are:
‘TGax Evaluation Methodology Appendix 1’ (default),
‘TGax Simulation Scenarios MAC Calibration’, or
If you set the
PHYAbstractionType parameter to
'TGax Evaluation Methodology Appendix 1', the PHY estimates the performance of a link with the TGax channel model by using an effective signal-to-interference-plus-noise ratio (SINR) mapping. Alternatively, the
'TGax Simulation Scenarios MAC Calibration' value of
PHYAbstractionType assumes a packet failure on interference without actually calculating the link performance. To use full PHY, set the value of
To use full MAC, set the value of
false. To use abstracted PHY, set the value of
‘TGax Evaluation Methodology Appendix 1’ or
‘TGax Simulation Scenarios MAC Calibration’. This example uses the PHY abstraction type as
'TGax Simulation Scenarios MAC Calibration'.
wlanNodes = hCreateWLANNodes(nodeConfig,trafficConfig, ... 'MACFrameAbstraction',false, ... 'PHYAbstractionType','TGax Simulation Scenarios MAC Calibration');
At the end of the simulation, remove the
mlWLANSystemSimulation folder from the path.
This table shows you how to switch between the abstracted and full MAC or PHY by configuring the values of the MACFrameAbstraction and PHYAbstractionType input parameters.
|Type of MAC and PHY|
Abstracted MAC and abstracted PHY (default combination)
Full MAC and abstracted PHY
Full MAC and full PHY
Abstracted MAC and full PHY
This combination is invalid because full PHY requires a MAC frame (to generate a waveform), which the abstracted MAC does not generate.