Main Content

MAC and PHY Layer Abstraction in System-Level Simulation

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).

Create 802.11ax System-Level Simulation with Full MAC and Abstracted PHY

To access the helper files that this example uses, add the mlWLANSystemSimulation folder to the MATLAB path.

addpath(genpath(fullfile(pwd,'mlWLANSystemSimulation')));

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.

load('wlanNodeConfig.mat');

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.

load('wlanTrafficConfig.mat');

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.

The hCreateWLANNodes helper function enables you to switch between abstracted and full MAC or PHY by configuring the MACFrameAbstraction and PHYAbstractionType input parameters. The valid values for these parameters are:

  • MACFrameAbstraction: true or false

  • PHYAbstractionType: ‘TGax Evaluation Methodology Appendix 1’ (default), ‘TGax Simulation Scenarios MAC Calibration’, or ‘None’

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 PHYAbstractionType to 'None'.

To use full MAC, set the value of MACFrameAbstraction to false. To use abstracted PHY, set the value of PHYAbstractionType to ‘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.

rmpath(genpath(fullfile(pwd,'mlWLANSystemSimulation')));

Switch Between Abstracted and Full Model of MAC or PHY

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 PHYMACFrameAbstraction ValuePHYAbstractionType Value

Abstracted MAC and abstracted PHY (default combination)

true

'TGax Evaluation Methodology Appendix 1' or 'TGax Simulation Scenarios MAC Calibration'

Full MAC and abstracted PHY

false

'TGax Evaluation Methodology Appendix 1' or 'TGax Simulation Scenarios MAC Calibration'

Full MAC and full PHY

false

'None'

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.

Related Topics