802.11 MAC and Application Throughput Measurement
此示例显示了如何使用Simevents®,StateFlow®和WLAN Toolbox™在多节点802.11A/N/AC/AX网络中测量MAC和应用层吞吐量。本示例中介绍的系统级模型包括功能,例如在应用层处配置流量的优先级,生成和解码wonn-HT,HT-MF,VHT,VHT,HE-SU和HE-EXT-SU的功能格式,MPDU聚合和启用MPDU的确认。使用此模型计算的应用层吞吐量已针对TGAX任务组的已发布校准结果进行验证[4] for Box 3 scenarios (Tests 1a, 1b, and 2a) specified in TGax evaluation methodology [3]。The obtained application layer throughput is within the range of minimum and maximum throughput specified in published calibration results [4]。
Throughput in 802.11 Networks
The IEEE® 802.11™ working group is continually adding features to 802.11 specification [1] to improve the throughput and reliability in WLAN networks. Throughput is the amount of data transmitted over a period of time. Medium Access Control (MAC) layer throughput refers to the amount of data successfully transmitted by the MAC layer over a period of time. MAC protocol data unit (MPDU) is the unit of transmission at MAC layer. In 802.11n, MPDU aggregation was introduced to increase the throughput. When MPDU aggregation is supported, MAC layer aggregates multiple MPDUs into an aggregated MPDU (A-MPDU) for transmission. This reduces the overhead of channel contention for transmitting multiple frames, resulting in enhanced throughput. In 802.11ac [1] and 802.11ax [2], the maximum limits for an A-MPDU length were increased resulting in even better throughput in WLAN networks.
802.11网络
这个例子WLAN网络模型和五个节点as shown in this figure. These nodes implement carrier-sense multiple access with collision avoidance (CSMA/CA) with physical carrier sense and virtual carrier sense. The physical carrier sensing uses the clear channel assessment (CCA) mechanism to determine whether the medium is busy before transmitting. Whereas, the virtual carrier sensing uses the RTS/CTS handshake to prevent the hidden node problem.
The model in the example displays various statistics such as the number of transmitted, received, and dropped packets at PHY and MAC layers. Moreover, the runtime figures that help in analyzing/estimating the node-level and network-level performance are also displayed in this model. This model is validated against the published calibration results from the TGax Task Group [4] for Box 3 scenarios (Tests 1a, 1b, and 2a) specified in TGax evaluation methodology [3]。
WLAN Network
Components of a WLAN Node
The components of a WLAN node are shown in this figure. The information is retrieved by pressing the arrow button for each node in the above figure.
Application, EDCA MAC, PHY, and Channel Block Capabilities
应用:
该应用层具有生成具有不同优先级级别的数据,如本图所示。这些优先级级别是使用Access Category
WLAN节点内的应用程序流量生成器块的掩模参数中的属性。您还可以为应用程序层配置数据包大小,包装间间隔和目标节点。
EDCA MAC:
The EDCA MAC block used in this example has the following capabilities:
生成和解码高效单用户(HE-SU),高效率扩展范围单用户(He-ext-SU),非常高的吞吐量(VHT),高吞吐量混合格式(HT-MF)和非HT的MAC框架格式。这些格式是使用
PHY Tx Format
如本图所示,在WLAN节点内的MAC EDCA块的掩模参数中的属性。Aggregate MPDUs to form an A-MPDU. This can be configured by setting
PHY Tx Format
to one ofHT-MF
,VHT
,HE-SU
, orHE-EXT-SU
。In case ofHT-MF
,MPDU Aggregation
property must also be enabled for A-MPDU generation.Acknowledge multiple MPDUs in an A-MPDU with a single block acknowledgment (BA) frame. MAC assumes a pre-configured BA session between the transmitter and the receiver of an A-MPDU.
Enable/disable acknowledgments. This can be configured using the
Ack Policy
property.Maintain separate retry limits for shorter frames (less than RTS threshold) and longer frames (greater than or equal to RTS threshold). These limits can be configured using the
Max Short Retries
andMax Long Retries
properties.Transmit multiple streams of data using the multiple-input multiple-output (MIMO) capability. You can configure this capability using the
Number of Transmit Chains
property. This property is applicable only when the value ofPHY Tx Format
property is set toVHT
,HE-SU
, orHE-EXT-SU
。The MIMO capability can also be used forHT
格式通过MCS
property. The range of values [0, 7], [8, 15], [16, 23], and [24, 31] correspond to one, two, three, and four streams of data respectively.Adapt the data rate according to the channel conditions through the
Rate Adaptation Algorithm
property. This is applicable only when the value ofPHY Tx Format
property is set toNon-HT
。You can choose betweenAuto Rate Fallback (ARF)
andMinstrel
algorithms. To maintain a constant data rate throughout the simulation,Fixed-Rate
option is available.Enable parallel transmissions between the basic service sets (BSSs) through the
Enable Spatial Reuse with BSS Color
property. This property is applicable only whenPHY Tx Format
property is set toHE-SU
,HE-EXT-SU
, orHe-mu-ofdma
。该模型不支持空间重用(SR)功能。金宝app要研究使用BSS着色对网络吞吐量的SR的影响,请参阅Spatial Reuse with BSS Coloring in 802.11ax Residential Scenario(WLAN工具箱)example.
PHY:
The PHY Transmitter and PHY Receiver blocks have the capability to generate and decode waveforms of Non-HT, HT-MF, VHT, HE-SU and HE-EXT-SU formats. You can configure the transmit gain and transmit power using theTx Gain
andTx Power
properties in the mask parameters of the PHY Transmitter block inside a WLAN node.
Similarly, you can configure the receive gain and receive noise figure using theRx Gain
andRX噪声图
properties in the mask parameters of the PHY Receiver block inside a WLAN node.
Channel:
通过自由空间路径模型和瑞利多径褪色确定的通道障碍被添加到传输的PHY波形中。您可以选择启用或禁用这些损伤模型。除了损伤模型外,信号接收范围还可以受到可选范围传播损耗模型的限制。为了建模这些损失中的任何一个,通道模型必须同时包含发件人和接收器位置以及传输信号强度。在将波形传递到PHY接收器块之前,该通道是在每个接收节点内部建模的。
Throughput Measurement
Throughput varies for different configuration parameters pertaining to the application, MAC & PHY layers. Any change in the configuration may either increase or decrease the throughput. You can vary the combination of these parameters to measure and analyze the throughput.
MCS
: PHY data ratePHY Tx Format
: PHY transmission formatPacket Size
: Application packet sizeMax A-MPDU Subframes
: Maximum number of subframes in an A-MPDUMax Tx Queue Size
:MAC传输队列大小
Along with above parameters, you can also vary the node positions, Tx & Rx gains, channel loss, number of nodes in the network, MAC contention parameters, number of transmit chains and rate adaptation algorithms to analyze MAC throughput. This example demonstrates the measurement and analysis of the MAC throughput by varying packet size in theApplication Traffic Generator
block.
Application Packet Size
Throughput is directly proportional to the application packet size. Smaller packet size results in greater number of packets to be transmitted. At the MAC layer, there is an overhead of contention time for each transmitted packet. This is because the MAC layer makes sure that the channel is idle for a specific amount of time (Refer section 10.3.2.3 of [1]) before transmitting any packet. Therefore, as the packet size decreases, the contention overhead increases resulting in lower throughput.
Model Configuration
您可以使用以下步骤配置应用程序数据包大小:
Open model
WLANMACThroughputMeasurementModel.slx
To go inside a node subsystem, click on the downward arrow at the bottom left of the node
To open mask parameters of the application, double click on
Application Traffic Generator
要启用申请,请设置
App State
to 'On'配置值
Packet Size
运行模拟并观察吞吐量。测试1a的TGAX校准结果[4] are shown below:
The above plot compares the calibration results for WLAN Toolbox against the published results of other companies listed in [4]。The blue colored curve represents the results of WLAN Toolbox, while the grey colored curves represent the results of other companies.
Simulation Results
The simulation of the model generates:
A run-time visualization showing the time spent on channel contention, transmission, and reception for each node
一个可选的运行时可视化(sim卡ulation) showing the number of frames queued in MAC transmission queues for a selected node.
A bar graph showing metrics for each node such as number of transmitted, received, and dropped packets at PHY and MAC layers
垫子文件
statistics.mat
with detailed statistics obtained at each layer for each node
This figure shows MAC state transitions with respect to simulation time.
You can also observe the live state of the MAC layer transmission buffers using the 'Observe MAC queue lengths' button in the above visualization.
This figure shows the network statistics at the end of simulation.
用TGAX校准结果验证应用层吞吐量
TGAX任务组[4] published application throughput results for different scenarios. You can observe the Layer 3 (above MAC layer) throughput of each node in the network in 'Throughput' column in 'statisticsTable' stored in 'statistics.mat'. The TGax calibration scenarios for MAC simulator published results of application throughput for a User Datagram Protocol (UDP) with Logical Link Control (LLC) layers overhead.
To calculate application throughput from simulation results use the code below:
% Load statistics.mat (Output of the simulation) filesimulationResults = load('statistics','statisticsTable');% Statisticsstats = simulationResults.statisticstable;% Successfully transmitted MAC layer bytes in the networktotalMACTxBytes = sum(stats.MACTxBytes);% UDP & LLC overheads (bytes)udpOverhead = 36; llcOverhead = 8;%UDP&LLC开销(字节)网络中udpAndLLCOverhead = sum(stats.MACTxSuccess)*(udpOverhead + llcOverhead);% Successfully transmitted application bytestotalAppTxBytes = totalMACTxBytes - udpAndLLCOverhead;% Time at which last transmission is completed in the network (Microseconds)simulationTime = max(stats.MACRecentFrameStatusTimestamp);% Application throughput (Mbps)applicationThroughput = (totalAppTxBytes*8)/simulationTime; disp(['Application Throughput = 'num2str(applicationThroughput)' Mbps']);
Application Throughput = 4.7276 Mbps
不同的TGAX校准方案的应用程序吞吐量针对不同的Mac服务数据单元(MSDU)尺寸绘制了30秒的仿真时间:如下所示:
Further Exploration
Configuration options
您可以更改这些配置参数,以进一步探索此示例:
Application layer: Access category and packet interval
MAC layer: RTS threshold, Tx queue size, data rate, short retry limit, long retry limit, transmitting frame format, MPDU aggregation, ack policy, number of transmit chains and the rate adaptation algorithms
PHY:PHY Tx gain, PHY Rx gain, and Rx noise figure
Channel modeling: Rayleigh fading, free space pathloss, range propagation loss and packet receive range
Node positions using node position allocator
The state of each node can be visualized during the run-time through the configuration available in the Visualizer block
By default, the PHY transmitter and the receiver blocks run in the
Interpreted execution
mode. For longer simulation time, configure all the blocks toCode generation
mode for better performance.
Related examples
为进一步探索参考这些示例:
To simulate the MAC Quality of Service (QoS) traffic scheduling in 802.11a/n/ac/ax networks using SimEvents, refer802.11 MAC QoS Traffic Scheduling(WLAN工具箱)example.
To model a multi-node IEEE 802.11ax network with abstracted PHY using SimEvents, refer802.11AX系统级仿真带有物理层抽象(WLAN工具箱)example.
要开始使用MATLAB建模多节点IEEE 802.11网络,请参阅Get Started with WLAN System-Level Simulation in MATLAB(WLAN工具箱)
要模拟使用MATLAB的多节点IEEE 802.11AX住宅场景,请参阅802.11ax Multinode System-Level Simulation of Residential Scenario Using MATLAB(WLAN工具箱)
此示例使您可以使用Simulink模型来创建和配置多节点802.11网络,以分析MAC和应用程序层吞吐量。金宝app在此模型中,通过仿真结果获得的MAC吞吐量用于计算应用程序层吞吐量。使用Box 3方案(测试1A,1B和2A)在TGAX评估方法中验证了该模型[3]确认它符合IEEE 802.11 [1]。该示例得出结论,计算出的应用层吞吐量在公开校准结果中指定的最小和最大吞吐量范围内[4]。
Appendix
The helper functions and objects used in this example are:
edcaFrameFormats.m: Create an enumeration for PHY frame formats.
edcaNodeInfo.m: Return MAC address of a node.
edcaPlotQueueLengths.m:在模拟中绘制MAC队列长度。
edcaPlotStats.m: Plot MAC state transitions with respect to simulation times.
edcaStats.m: Create an enumeration for simulation statistics.
edcaUpdateStats.m: Update statistics of the simulation.
helperaggregatempdus.m: Generate an A-MPDU, by creating and appending the MPDUs containing the MSDUs in the MSDULIST.
helpersubframeboundaries.m: Return subframes information of an A-MPDU.
phyrx.m: Model PHY operations related to packet reception.
phyTx.m:模型PHY操作与数据包传输有关。
edcaApplyFading.m: Apply Rayleigh fading effect on the waveform.
hesigbuserfielddecode.m:解码HE-SIG-B用户字段。
heSIGBCommonFieldDecode.m: Decode HE-SIG-B common field.
heSIGBMergeSubchannels.m: Merge 20MHz HE-SIG-B subchannels.
addmupadding.m: Add multiuser PSDU padding.
macQueueManagement.m: Create a WLAN MAC queue management object.
roundRobinScheduler.m: Create a round-robin scheduler object.
calculateSubframesCount.m: Return number of subframes to be aggregated.
drigns vhtsigabitsfailcheck.m: Interprets the bits in VHT-SIG-A field
Rateadaptationarf.m: Create an auto rate fallback (ARF) algorithm object.
Rateadaptationminstrelnonht.m:创建一个Minstrel算法对象。
References
IEEE Std 802.11™-2020. 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.
IEEE Std 802.11ax™-2021. 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.11-14/0571R12。“ 11AX评估方法。”IEEE P802.11p:无线LAN。
Baron, Stephane., Nezou, Patrice., Guignard, Romain., and Viger, Pascal. "MAC Calibration Results." Presentation at the IEEE P802.11 - Task Group AX, September 2015.