Main Content

802.11ax Multinode System-Level Simulation of Residential Scenario Using MATLAB

This example shows how to model performance of an IEEE® 802.11ax™ [1] network in a residential scenario by using WLAN Toolbox™.

Using this example, you can -

  • Model a residential scenario by configuring the network and channel parameters.

  • Simulate a multinode WLAN system and visualize the network-related statistics.

The Results section plots performance metrics such as throughput, latency, and packet loss.

Residential Scenario Description

This example demonstrates a system-level simulation to evaluate the performance of an 802.11ax network in a residential scenario. The residential scenario consists of a building with 3 floors. The spacing between the floors is 1.5 meters. Each floor consists of four rooms, each having dimensions 10m x 10m x 3m. Each room has an access point (AP) and two stations (STAs) placed in random x- and y- locations at a height of 1.5 meters from the floor. Each AP has data for STAs present in the same room. The simulation scenario specifies a path loss model based on the distance between the nodes, and the number of walls and floors traversed by the WLAN signal. This figure shows the residential scenario simulated in this example.

This example models the medium access control (MAC) layer and physical layer (PHY) of all the nodes (APs and STAs) using abstractions. The MAC layer implements enhanced distributed channel access (EDCA) functionality. The MAC layer uses abstraction for frame generation and decoding. Abstraction refers to the fact that MAC layer sends and receives frame metadata instead of sending or receiving encoded MAC frame bits. Similarly, the PHY uses abstraction for WLAN signal generation and decoding. For more information on PHY abstraction, see Physical Layer Abstraction for System-Level Simulation example.

This example is calibrated against Box-3 and Box-5 scenarios specified in TGax evaluation methodology [2]. The network throughput calculated for the scenarios mentioned in TGax simulation scenarios document [3] are validated against the published calibration results from the TGax Task Group, to confirm compliance with IEEE 802.11.

Configuration Parameters

Simulation Parameters

Set the seed for the random number generator to 1. For greater accuracy in the simulation results, change the seed and average the results over multiple simulations. Specify simulation time in microseconds using simulationTime variable. To visualize a live state transition plot for all nodes, set showLiveStateTransitionPlot variable to true. To visualize the table containing network statistics at the end of simulation, set displayStatsInUITable variable to true.

rng(1,'twister');                       % Seed for random number generator
simulationTime = 0.1*1e6;               % Simulation time in microseconds
showLiveStateTransitionPlot = true;     % Show live state transition plot for all nodes
displayStatsInUITable = true;           % Display table of statistics

% Add the folder to the path for access to all helper files
addpath(genpath(fullfile(pwd, 'mlWLANSystemSimulation')));

Residential Scenario Parameters

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

  • BuildingLayout: Specifies the building layout in terms of number of rooms in each of the three directions

  • RoomSize: Specifies the size of each room in meters

  • NumRxPerRoom: Specifies the number of stations per room

The example assumes one transmitting AP and two receiving STAs in each room. The hDropNodes function randomly generates the positions of the AP and STAs within each room.

ScenarioParameters = struct;
% Number of rooms in [x,y,z] directions
ScenarioParameters.BuildingLayout = [2 2 3];
% Size of each room in meters [x,y,z]
ScenarioParameters.RoomSize = [10 10 3];
% Number of STAs per room
ScenarioParameters.NumRxPerRoom = 2;

% Obtain random positions for placing nodes
[apPositions, staPositions] = hDropNodes(ScenarioParameters);

Node Parameters

The hLoadConfiguration function loads the MAC and PHY configurations for the nodes specified by nodeConfigs and loads the application traffic configuration for the transmitting nodes specified by trafficConfigs. This function assigns identifiers (IDs) and positions to all the nodes in the network.

% Get the IDs and positions of each node
[nodeConfigs, trafficConfigs] = hLoadConfiguration(ScenarioParameters, apPositions, staPositions);

The wlanNodeConfig.mat file defines the structure for specifying the MAC and PHY configuration of a node. For more information about the detailed configuration parameters in this MAT file, use the command hConfigurationHelp('wlanNodeConfig'). The nodeConfigs output of the hLoadConfiguration function is an array of these structures. You can modify the MAC configuration parameters such as format, channel bandwidth, modulation and coding scheme (MCS) index, for the transmitted packets. You can also modify the physical layer parameters such as transmit power, transmit gain, receive gain, noise power. For example, this code configures node-1 to transmit packets with a fixed MCS-6.

nodeConfigs(1).TxMCS = 6
nodeConfigs=1×36 struct array with fields:
    NodePosition
    TxFormat
    Bandwidth
    TxMCS
    NumTxChains
    MPDUAggregation
    DisableAck
    MaxSubframes
    RTSThreshold
    DisableRTS
    MaxShortRetries
    MaxLongRetries
    BasicRates
    Use6MbpsForControlFrames
    BandAndChannel
    CWMin
    CWMax
    AIFSSlots
    RateControl
    PowerControl
    TxPower
    TxGain
    RxGain
    EDThreshold
    RxNoiseFigure
    ReceiverRange
    FreeSpacePathloss
    PHYAbstractionType
      ⋮

The wlanTrafficConfig.mat file defines the structure for specifying the application traffic configuration. For more information about the detailed configuration parameters in this MAT file, use the command hConfigurationHelp('wlanTrafficConfig'). The trafficConfigs output of the hLoadConfiguration function is an array of these structures. Each structure corresponds to a specific destination STA node. You can modify parameters like packet size, data rate, or access category for each application in the array. The simulation scenario in this example configures the Best Effort (AC0) traffic from APs to STAs. For example, the first structure in the array specifies application traffic for node-1 (AP) to node-13 (STA). For example, this code configures the transmission of 1000 byte-sized application packets from node-1 to node-13. All other transmitters use a default packet size of 1500 bytes.

trafficConfigs(1).PacketSize = 1000
trafficConfigs=1×24 struct array with fields:
    SourceNode
    DestinationNode
    PacketSize
    DataRateKbps
    AccessCategory

Create Network

Create transmitter and receiver sites from the node configurations. Create the building geometry from the scenario parameters.

% Create transmitter and receiver sites
[txs,rxs] = hCreateSitesFromNodes(nodeConfigs);

% Create triangulation object and visualize the scenario
tri = hTGaxResidentialTriangulation(ScenarioParameters);
hVisualizeScenario(tri,txs,rxs,apPositions);

Figure contains an axes. The axes contains 40 objects of type patch, line, text, scatter. These objects represent AP, STA.

This example uses the TGax residential propagation model to determine pathloss between nodes. Path loss is a function of the number of walls, floors, and the distance between nodes. Create a path loss model using hTGaxResidentialPathLoss function. Create a function handle which returns the path loss between each pair of nodes in the network using the propagation model and transmitter and receiver sites. The hCreateWLANNodes function creates the configured WLAN nodes.

% Generate propagation model and lookup table
propModel = hTGaxResidentialPathLoss('Triangulation',tri,'ShadowSigma',0,'FacesPerWall',1);
[pl,tgaxIndoorPLFn] = hCreatePathlossTable(txs,rxs,propModel);

% Create WLAN nodes
wlanNodes = hCreateWLANNodes(nodeConfigs, trafficConfigs, simulationTime, tgaxIndoorPLFn);

Simulation

Initialize the visualization and simulation parameters.

% Initialize visualization parameters and create an object for
% hStatsLogger which is a helper for retrieving, and displaying
% the statistics.
visualizationInfo = struct;
visualizationInfo.DisablePlot = ~showLiveStateTransitionPlot;
visualizationInfo.Nodes = wlanNodes;
statsLogger = hStatsLogger(visualizationInfo);  % Object that handles retrieving and visualizing statistics
networkSimulator = hWirelessNetworkSimulator;   % Object that handles network simulation

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

% Run the simulation
run(networkSimulator, wlanNodes, simulationTime, statsLogger);

Figure MAC State Transitions Over Time contains an axes and another object of type uicontrol. The axes contains 1115 objects of type bar, rectangle. These objects represent Contention, Transmission, Reception(destined to others), Idle/EIFS/SIFS, Reception(destined to node).

% Cleanup the persistent variables used in functions
clear edcaPlotStats;

Results

Retrieve the statistics and store them in a mat file. The UI table shows all the statistics collected during the simulation.

% Retrieve the statistics and store them in a mat file
statistics = getStatistics(statsLogger, ~displayStatsInUITable);
statisticsTable=101×36 table
                                Node1    Node2    Node3    Node4    Node5    Node6    Node7    Node8    Node9    Node10    Node11    Node12    Node13    Node14    Node15    Node16     Node17     Node18    Node19    Node20    Node21    Node22    Node23    Node24    Node25    Node26    Node27    Node28    Node29    Node30    Node31    Node32    Node33    Node34     Node35     Node36
                                _____    _____    _____    _____    _____    _____    _____    _____    _____    ______    ______    ______    ______    ______    ______    ______    ________    ______    ______    ______    ______    ______    ______    ______    ______    ______    ______    ______    ______    ______    ______    ______    ______    ______    ________    ______

    ActiveOperationInFreq           1        1        1        1        1        1        1        1        1        1         1         1         1       1           1         1            1        1         1         1         1         1       1         1           1         1       1         1           1         1         1         1         1       1              1        1 
    AppTx                       12500    10000    10000    10000    10000    10000    10000    10000    10000    10000     10000     10000         0       0           0         0            0        0         0         0         0         0       0         0           0         0       0         0           0         0         0         0         0       0              0        0 
    AppRx                           0        0        0        0        0        0        0        0        0        0         0         0        43       0          32        32           96       32        64        64        64        64       0         0           5        32       0         0          64        64        35        64        32       0             96       64 
    AppRxBytes                      0        0        0        0        0        0        0        0        0        0         0         0     43000       0       48000     48000     1.44e+05    48000     96000     96000     96000     96000       0         0        7500     48000       0         0       96000     96000     52500     96000     48000       0       1.44e+05    96000 
    AppAvgPacketLatency             0        0        0        0        0        0        0        0        0        0         0         0     28509       0       67720     78853        58339    45246     34367     75986     34050     70382       0         0         997     34062       0         0       70228     70233     21354     17515     95524       0          50997    64829 
    MACInternalCollisionsAC1        0        0        0        0        0        0        0        0        0        0         0         0         0       0           0         0            0        0         0         0         0         0       0         0           0         0       0         0           0         0         0         0         0       0              0        0 
    MACInternalCollisionsAC2        0        0        0        0        0        0        0        0        0        0         0         0         0       0           0         0            0        0         0         0         0         0       0         0           0         0       0         0           0         0         0         0         0       0              0        0 
    MACInternalCollisionsAC3        0        0        0        0        0        0        0        0        0        0         0         0         0       0           0         0            0        0         0         0         0         0       0         0           0         0       0         0           0         0         0         0         0       0              0        0 
    MACInternalCollisionsAC4        0        0        0        0        0        0        0        0        0        0         0         0         0       0           0         0            0        0         0         0         0         0       0         0           0         0       0         0           0         0         0         0         0       0              0        0 
    MACBackoffAC1                 261      378      486      396      261      297      459      135      351      567       261       378         0       0           0         0            0        0         0         0         0         0       0         0           0         0       0         0           0         0         0         0         0       0              0        0 
    MACBackoffAC2                   0        9      135       90        0        0       99        0       90      144       117       108         0       0           0         0            0        0         0         0         0         0       0         0           0         0       0         0           0         0         0         0         0       0              0        0 
    MACBackoffAC3                  18       72      162      135      126       27      117        0      126      171        18        99         0       0           0         0            0        0         0         0         0         0       0         0           0         0       0         0           0         0         0         0         0       0              0        0 
    MACBackoffAC4                  27       45       63       45       27       18       27        0       27       63         0        72         0       0           0         0            0        0         0         0         0         0       0         0           0         0       0         0           0         0         0         0         0       0              0        0 
    MACDataTx                      72       96      192      128      128       32       69        0      160      163        32       192         0       0           0         0            0        0         0         0         0         0       0         0           0         0       0         0           0         0         0         0         0       0              0        0 
    MACTxAC1                       72       96      192      128      128       32       69        0      160      163        32       192         0       0           0         0            0        0         0         0         0         0       0         0           0         0       0         0           0         0         0         0         0       0              0        0 
    MACTxAC2                        0        0        0        0        0        0        0        0        0        0         0         0         0       0           0         0            0        0         0         0         0         0       0         0           0         0       0         0           0         0         0         0         0       0              0        0 
      ⋮

You can access all the statistics from the above table by exploring the statistics.mat file.

% Save the statistics to a mat file
save('statistics.mat', 'statistics');

The hPlotNetworkStats helper function parses the collected statistics and plots the throughput, packet loss ratio, and average packet latency values at each node. The plot shows throughput and packet loss ratio at each transmitter (APs). The plot also shows the average packet latency experienced at each receiver node (STAs). The throughput shows the achieved data rate at each AP in units of megabits per second (Mbps). The packet loss ratio shows the ratio of unsuccessful data transmissions to the total data transmissions. The average packet latency shows the average latency experienced at each STA to receive its downlink traffic from the AP.

% Plot the throughput, packet loss ratio, and average packet latency at each node
hPlotNetworkStats(statistics, wlanNodes);

Figure contains 3 axes. Axes 1 with title Throughput at each transmitter contains an object of type bar. Axes 2 with title Packet loss at each transmitter contains an object of type bar. Axes 3 with title Average packet latency experienced at each receiver contains an object of type bar.

% Remove the folder from the path
rmpath(genpath(fullfile(pwd, 'mlWLANSystemSimulation')));

Further Exploration

To observe the variation of throughput when a STA moves within a room, you can run the simulation for different positions of a STA with a fixed AP. You can observe the variation of throughput with respect to distance from its AP. The set of throughputs captured at all different positions can be used to plot a heatmap like the one shown here.

References

  1. IEEE P802.11ax™/D4.1. "Amendment 6: Enhancements for High Efficiency WLAN.." Draft 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.

  2. “TGax simulation scenarios”, doc. IEEE 802.11-14/0980r16.

  3. “11ax evaluation methodology”, doc. IEEE 802.11-14/0571r12.