Contenido principal

wlanDeviceConfig

R2026b

Device configuration for WLAN node

Since R2023a

Description

The wlanDeviceConfig object contains properties that configure a WLAN node. The DeviceConfig property of a wlanNode object accepts a wlanDeviceConfig object or a vector of such objects.

Creation

Description

deviceCfg = wlanDeviceConfig creates a default WLAN device configuration object.

example

deviceCfg = wlanDeviceConfig(PropertyName=Value) sets properties of the WLAN device configuration object using one or more optional name-value arguments.

example

Properties

expand all

Operating mode of the device, specified as "STA", "AP", or "mesh". These values mean that the device is a station, access point, or mesh point, respectively.

Data Types: char | string

Since R2026b

WLAN standard supported by the device, specified as one of these options.

  • "max" — Creates a device that supports reception capabilities of the latest standard from the list. The device is capable of decoding physical layer protocol data units (PPDUs) of any physical layer (PHY) format, modulation and coding scheme (MCS), and number of space-time streams supported in the simulation. It uses fixed transmission parameters specified in wlanDeviceConfig.

  • "HT" — IEEE® 802.11n™

  • "VHT" — IEEE 802.11ac™

  • "HE" — IEEE 802.11ax™

  • "EHT" — IEEE 802.11be™

Setting the standard capability of a device to any value other than "max" limits receive capabilities of the device according to the specified standard.

Operating frequency band and channel number, specified as a row vector of length 2. The first vector entry specifies the frequency band in GHz. It must be 2.4, 5, or 6. The second entry specifies the channel number. It takes the following values:

  • An integer in the range [1, 13] if the frequency band is 2.4 GHz

  • An integer in the range [36, 177] if the frequency band is 5 GHz

  • An integer in the range [1, 233] if the frequency band is 6 GHz

The Valid Channel Number and Bandwidth Combinations topic describes the valid combinations of band, channel number, and channel bandwidth.

Data Types: double

Maximum bandwidth for transmission or reception in Hz, specified as 20e6, 40e6, 80e6, 160e6, or 320e6. The possible values for this property depend on the BandAndChannel and TransmissionFormat properties.

  • If you set the first entry of the BandAndChannel to 2.4, this property supports 20e6 Hz and 40e6 Hz.

  • If you set the TransmissionFormat property to "Non-HT" or "HE-EXT-SU", this property supports only 20e6 Hz.

  • If you set the value of the TransmissionFormat property to "HT-Mixed" or the value of the StandardCapability property (since R2026b) to "HT", this property supports 20e6 Hz and 40e6 Hz.

  • If you set the value of the TransmissionFormat property to "VHT", "HE-SU", or "HE-MU-OFDMA", or the value of the StandardCapability property (since R2026b) to "VHT" or "HE", this property supports 20e6 Hz, 40e6 Hz, 80e6 Hz, and 160e6 Hz.

  • If you set the value of the TransmissionFormat property to "EHT-SU" or when the value of the StandardCapability property (since R2026b) is "EHT", this property supports all channel bandwidths.

Note

Devices operating on the same center frequency must specify an identical value to this property.

The Valid Channel Number and Bandwidth Combinations topic describes the valid combinations of band, channel number, and channel bandwidth.

Data Types: single | double

Since R2025a

Index of primary 20 MHz channel of the basic service set (BSS) created by the AP, specified as an integer in the range [1, MaxPrimaryChannelIndex]. MaxPrimaryChannelIndex is the maximum number of 20 MHz channels that can be present in the channel bandwidth. This table shows how the MaxPrimaryChannelIndex value depends on the ChannelBandwidth value.

ChannelBandwidth Value

MaxPrimaryChannelIndex Value

40e6

2

80e6

4

160e6

8

320e6

16

If you specify the ChannelBandwidth value as 20e6, the value of this property is 1. Note that the indexing of the primary 20 MHz channel starts from the lowest 20 MHz subchannel.

Dependencies

To enable this property, set the Mode property to "AP" and the ChannelBandwidth property to a value greater than 20e6.

Data Types: double

Physical layer (PHY) transmission format, specified as one of these options.

  • "HE-SU"

  • "Non-HT"

  • "HT-Mixed"

  • "VHT"

  • "HE-EXT-SU"

  • "HE-MU-OFDMA"

  • "EHT-SU"

  • "auto" (since R2026b)

This property determines the transmission format that the device uses for the unicast data frame transmissions. The "HE-MU-OFDMA" value of this property specifies the "HE-MU" format with downlink orthogonal frequency-division multiple access (DL OFDMA) frame exchange sequence containing DL multiuser (MU) PHY protocol data unit (PPDU), DL MU-block ACK request (MU-BAR), and uplink (UL) MU BAs. The "EHT-SU" value of this property specifies extremely high-throughput (EHT) MU PPDU format for a single user (SU). The data frames transmitted in response to trigger frames always use the "HE-TB" format regardless of the value to which you set this property. The broadcast data frame transmissions always use the "Non-HT" format regardless of the value to which you set this property.

When set to "auto", the device automatically selects the highest common PPDU format supported by both the transmitter and receiver. When set to a specific format (such as "Non-HT", "HT-Mixed", "VHT", "HE-SU", "HE-EXT-SU", "HE-MU-OFDMA", or "EHT-SU"), the device uses that format for all transmissions.

The default value of TransmissionFormat depends on the StandardCapability property (since R2026b). When you set the value of StandardCapability to a specific IEEE 802.11 amendment ("HT", "VHT", "HE", or "EHT"), TransmissionFormat defaults to "auto". For a default value of "max" for the StandardCapability property, the default value of TransmissionFormat is "HE-SU".

Dependencies

  • To enable the "HE-MU-OFDMA" value of this property, set the Mode property to "AP" and the MACModel property of the wlanNode object to "full-mac-with-frame-abstraction".

Data Types: char | string

Note

The object does not support a TransmissionFormat value set to "HE-MU-OFDMA" in combination with a nonzero BSSColor value.

Modulation and coding scheme, specified as an integer in the range [0, 13]. For unicast data frame transmissions, the set of values that this property can take depends on the TransmissionFormat property.

  • When TransmissionFormat is "Non-HT" or "HT-Mixed", or when the value of the StandardCapability property (since R2026b) is "HT", the range of values is [0, 7]. The given value in the range [0, 7] maps to a value in the range [0, 31] using the calculation MCS+(NSTS–1)*8, where NSTS is the value of the NumSpaceTimeStreams property.

  • When TransmissionFormat is "VHT" or when the value of the StandardCapability property (since R2026b) is "VHT", the range of values is [0, 9]. The set of possible values for VHT PPDUs additionally depends on the ChannelBandwidth and NumSpaceTimeStreams properties:

    • When ChannelBandwidth is 20e6, you can set the MCS value to 9 only when NumSpaceTimeStreams is set to 3 or 6.

    • When ChannelBandwidth is 80e6, the MCS value 6 is not supported when NumSpaceTimeStreams is set to 3 or 7. The MCS value 9 is not supported when NumSpaceTimeStreams is set to 6.

    • When ChannelBandwidth is 160e6, the MCS value 9 is not supported when NumSpaceTimeStreams is set to 3.

  • When TransmissionFormat is "HE-EXT-SU", the range of values is [0, 2].

  • When TransmissionFormat is "HE-SU" or "HE-MU-OFDMA", or when the value of the StandardCapability property (since R2026b) is "HE", the range of values is [0, 11].

  • When TransmissionFormat is "EHT-SU" or when the value of the StandardCapability property (since R2026b) is "EHT", the range of values is [0, 13].

Broadcast data frame transmissions always use a value of 0, regardless of the value you set for this property. If you set the Mode property to "AP" and the EnableUplinkOFDMA property to 1 (true), the AP asks the associated stations to use this value for uplink (UL) OFDMA transmissions.

Data Types: single | double

Number of transmit antennas, specified as an integer in the range [1, 8]. The device uses the same number of antennas for reception.

Note

Starting in R2026b, all devices in the network can have different values for this property. In releases R2026a and earlier, all devices in the network must have the same value for this property.

Data Types: single | double

Number of space-time streams for unicast data frame transmissions, specified as an integer in the range [1, 8]. The value of this property must be less than or equal to the value of the NumTransmitAntennas property. If you set this value less than the value of NumTransmitAntennas, the node uses the Fourier spatial mapping. Broadcast data frame transmissions always use a value of 1, regardless of the value you set for this property. If you set the Mode property to "AP" and the EnableUplinkOFDMA property to 1 (true), the AP asks the associated stations to use this value for UL OFDMA transmissions. If you set the Mode property to "STA" and the EnableUplinkOFDMA property in the associated AP to 1 (true), the STA ignores this property and uses the value from the trigger frame for UL OFDMA transmissions.

Data Types: single | double

HT medium access control (MAC) protocol data unit (MPDU) aggregation selection, specified as 1 (true) or 0 (false). Set this property to true to create an aggregated MPDU (A-MPDU) by concatenating multiple MPDUs.

Dependencies

This property applies to the transmission of HT-Mixed PPDUs.

Data Types: logical

Maximum number of MPDUs in an A-MPDU, specified as an integer in the range [1, 1024]. The set of values that this property can take depends on the TransmissionFormat property:

  • When TransmissionFormat is "HT-Mixed" or the value of StandardCapability property (since R2026b) is "HT" and the AggregateHTMPDU property is set to true, the range of values is [1, 64].

  • When TransmissionFormat is "VHT" or the value of StandardCapability property (since R2026b) is "VHT", the range of values is [1, 64].

  • When TransmissionFormat is "HE-SU", "HE-EXT-SU", or "HE-MU-OFDMA", or the value of StandardCapability property (since R2026b) is "HE", the range of values is [1, 256].

  • When TransmissionFormat is "EHT-SU" or when the value of the StandardCapability property (since R2026b) is "EHT", the range of values is [1, 1024].

The default value of MPDUAggregationLimit depends on the StandardCapability property (since R2026b). When you set the value of StandardCapability to a specific IEEE 802.11 amendment ("HT", "VHT", "HE", or "EHT"), MPDUAggregationLimit defaults to []. For a default value of "max" for the StandardCapability property, the default value of MPDUAggregationLimit is 64.

When you set MPDUAggregationLimit to [], the device chooses the highest possible aggregation limit based on the maximum bitmap length the receiver supports.

Dependencies

This property does not apply to Non-HT transmissions or to HT-Mixed transmissions when AggregateHTMPDU is set to false.

Data Types: single | double

Size of the MAC transmission queue, specified as an integer scalar in the range [1, 2048]. This property specifies the size of the MAC transmission queue for buffering the MAC service data units (MSDUs). This value corresponds to the queue size per destination and per access category (AC).

If you do not specify the value of TransmitQueueSize when creating the configuration object, it defaults to 1024 when you set the value of TransmissionFormat to "EHT-SU" or set the value of the StandardCapability property (since R2026b) to "EHT". It defaults to 256 in all other cases.

Data Types: double

Maximum number of transmission attempts for a frame, specified as an integer in the range [1, 65535].

Data Types: single | double

Threshold for RTS transmission, specified as an integer in the range [0, 6500631]. If the size of a MAC frame exceeds the value of this property, the node uses the request to send/clear to send (RTS/CTS) mechanism.

Dependencies

This property applies only when the DisableRTS property is set to false and the TransmissionFormat property is not set to "HE-MU-OFDMA"

Data Types: single | double

RTS transmission selection, specified as 0 (false) or 1 (true). Set this property to true to disable the RTS/CTS protection mechanism in the simulation.

Data Types: logical

Disable acknowledgements selection, specified as 0 (false) or 1 (true). Set this property to true to disable the transmission of acknowledgements in response to data frames.

Data Types: logical

Minimum range of contention window for the four access categories (ACs), specified as a 1-by-4 vector of integers in the range [1, 1023]. Note that each element in the vector must be in the form of 2x-1, where x is an integer. The four entries are the minimum ranges, in slots, for the Best Effort, Background, Video, and Voice ACs, respectively.

Maximum range of contention window for the four ACs, specified as a 1-by-4 vector of integers in the range [1, 1023]. Note that each element in the vector must be in the form of 2x-1, where x is an integer. The four entries are the maximum ranges, in slots, for the Best Effort, Background, Video, and Voice ACs, respectively.

Arbitration interframe space values for the four ACs, specified as a vector of four integers in the range [1, 15]. The entries of the vector represent the AIFS values, in slots, for the Best Effort, Background, Video, and Voice ACs, respectively. You can set the AIFS value for an AC to 1 only if the Mode property is "AP".

Transmission opportunity (TXOP) duration limit, specified as a vector of four integers in the range [0, 1023]. The four integers are the TXOP limit values for the Best Effort, Background, Video, and Voice ACs, respectively. The limits are in units of 32 microseconds. If you specify a vector element as 0, the object disables multiple frame transmissions within a TXOP for the AC that corresponds to that element.

Note

The value of this property must be [0 0 0 0] in these cases:

  • You specify the Mode property as "mesh".

  • You specify the TransmissionFormat property as "Non-HT".

  • "HT-Mixed" format transmissions with AggregateHTMPDU flag set to false.

Rate control algorithm, specified as one of these options.

  • "fixed" — The wlanNodeobject uses the values of MCS and NumSpaceTimeStreams properties.

  • "auto-rate-fallback" — The wlanNode object uses a wlanRateControlARF object with default properties.

  • wlanRateControlARF object — You can specify the wlanRateControlARF object, either with or without its properties.

  • An object of a subclass of wlanRateControl — The wlanNode object retrieves the value of the MCS and the value of the number of space-time streams from the custom rate control object. When you create the corresponding wlanNode object, it creates and uses a copy of the custom rate control object, so any changes you make to the original custom rate control object do not reflect. This property supports dynamic rate control only for single-user transmissions.

    If you set the value of TransmissionFormat to "HE-MU-OFDMA" or set the value of EnableDownlinkOFDMA to true, you must set this property to "fixed". When you set the value of the Mode property to "AP" and set the value of the EnableUplinkOFDMA property to true, the AP instructs associated stations to use the value in the MCS property for UL OFDMA transmissions, regardless of this configuration.

6 Mb/s for control frames selection, specified as 0 (false) or 1 (true). Set this property to true to use a data rate of 6 Mb/s for control frames. Control frames always use the "Non-HT" transmission format.

Data Types: logical

Non-HT data rates supported in the basic service set (BSS), specified as a vector that is a subset of [6 9 12 18 24 36 48 54]. You must include 6, 12, and 24, as these are mandatory.

Dependencies

This property applies only when the Mode property is set to "AP". The stations associated with an AP use the same basic rates as the AP.

Data Types: single | double

Enable AP to trigger UL OFDMA transmissions, specified as 0 (false) or 1 (true). If you set this property to 1 (true), the AP node triggers the UL OFDMA data transmissions from the associated stations.

Dependencies

This property is only applicable when one of the following conditions is true.

  • You set Mode to "AP" and set TransmissionFormat to "HE-SU" or "HE-MU-OFDMA".

  • You set Mode to "AP", set StandardCapability to "HE", or "EHT", and set TransmissionFormat to "auto". (since R2026b)

Since R2026b

Enable AP to send multi-user (MU) PPDUs using OFDMA, specified as 0 (false) or 1 (true). If you set this property to 1 (true), the AP node sends MU PPDUs carrying data frames using DL OFDMA to the associated stations. If the AP cannot schedule an MU PPDU to multiple STAs, it switches to sending SU format PPDUs. The device currently supports only HE MU PPDUs (802.11ax OFDMA) with a frame exchange sequence that includes HE MU PPDU, DL MU-BAR, and UL MU BAs. You can enable this property only when you set MACModel in the corresponding wlanNode object to "full-mac-with-frame-abstraction".

Dependencies

This property is only applicable when you set the value of Mode to "AP" and the value of StandardCapability property (since R2026b) to "HE" or "EHT".

Mesh time-to-live, specified as an integer in the range [1, 255]. The value of this property is the maximum number of hops that a packet can traverse in a mesh network before being dropped.

Dependencies

This property applies only when the Mode property is set to "mesh".

Data Types: single | double

Transmit power in dBm, specified as a real scalar. If you enable spatial reuse by setting the BSSColor property to a nonzero value, the object might not use this value. Instead, the object compares the value of this property with the adjusted transmit power and uses the smallest of the two. The adjusted transmit power is defined in Section 26.10.2.4 of IEEE Std 802.11ax-2021 [1].

Data Types: single | double

Transmit gain in dB, specified as a real scalar.

Data Types: single | double

Note

The wlanNode transmits each packet at a total power equal to the sum of the TransmitPower and TransmitGain properties of this object.

Receive gain in dB, specified as a real scalar.

Data Types: single | double

Receiver noise figure in dB, specified as a nonnegative scalar.

Data Types: single | double

Color of the basic service set (BSS), specified as an integer in the range [0, 63]. Specifying a nonzero value for this property enables you to use the spatial reuse operation.

Dependencies

This property applies only when Mode is "AP" and either

  • You set the value of the StandardCapability property to "HE" or "EHT".

  • You set the value of the TransmissionFormat property to "HE-SU", "HE-EXT-SU", or "EHT-SU" (when the value of StandardCapability is "max").

Data Types: single | double

Note

The object does not support a nonzero BSSColor value in combination with a TransmissionFormat value set to "HE-MU-OFDMA".

Overlapping basic service set packet detect (OBSS PD) threshold in dBm, specified as a scalar in the range [–82, -62]. If the device detects a frame with a BSS color different from its own, it uses this value to decide whether to ignore the received frame and contend for its own transmission.

Dependencies

  • If Mode is set to "AP", this property applies when the BSSColor property is nonzero.

  • If Mode is set to "STA", this property applies when the BSS color of the associated AP is nonzero.

  • If Mode is set to "mesh", this property does not apply.

Data Types: single | double

Beacon interval in TU, specified as a scalar integer in the range [1, 65535]. A TU is a measurement of time equal to 1024 microseconds. At the end of each beacon interval, the beacon frames contend for medium access by using the default values of CWMin, CWMax, and AIFS (which are 3, 7, and 2, respectively) corresponding to the voice access category. The MAC sets the service set identifier (SSID) in a beacon frame to "WLAN". To differentiate beacons of different AP or mesh devices in a packet analyzer tool such as Wireshark, use the MAC address of the AP or mesh device transmitting the beacon.

Dependencies

To enable this property, set the Mode property to "AP" or "mesh".

Data Types: double

Time offset specified for the first beacon transmission in TUs, specified as a nonnegative scalar integer or a nonnegative row vector of [MinTimeOffset, MaxTimeOffset]. A TU is a measurement of time equal to 1024 microseconds.

  • If you specify this property as a scalar, the object assigns this value to the initial time offset.

  • If you specify this property as a row vector, the object assigns a random initial time offset in the range [MinTimeOffset×1024e3, MaxTimeOffset×1024e3].

The valid values of scalar offset, MinTimeOffset, and MaxTimeOffset are the integers in the range [0, 65535].

Dependencies

To enable this property, set the Mode property to "AP" or "mesh" and the BeaconInterval property to a finite value.

Data Types: double

Type of interference modeling, specified as "co-channel", "overlapping-adjacent-channel", or "non-overlapping-adjacent-channel".

  • "co-channel" — If you set this property to "co-channel", the object considers signals with the same center frequency and bandwidth as the receiver, to be signal of interest (SOI) and interference. In this figure, fS, fE, and fC are the starting, ending, and center frequencies of the SOI, respectively.

  • "overlapping-adjacent-channel" — If you set this property to "overlapping-adjacent-channel", in addition to signals that satisfy the condition described under "co-channel", the object considers:

    • Signals that satisfy these conditions as SOI:

      • One of the 20 MHz subchannels that receives the signal, aligns with the primary 20 MHz of the receiver

      • Bandwidth of the signal is less than or equal to the receiver's operating bandwidth

    • Signals overlapping in frequency with the frequency range of the receiver operation, to be interference.

  • "non-overlapping-adjacent-channel" — If you set this property to "non-overlapping-adjacent-channel", in addition to signals that satisfy the conditions described under "co-channel" and "overlapping-adjacent-channel", the object considers:

    • Signals that overlap with frequencies in the range [fSfD, fE + fD] are interference. fD is the value of the MaxInterferenceOffset property.

In networks where nodes operate in channels and bandwidths that cause partial frequency overlap, specify this property as "overlapping-adjacent-channel" or "non-overlapping-adjacent-channel".

Dependencies

Abstract PHY simulations do not support modeling adjacent channel interference. To specify this property as "overlapping-adjacent-channel" or "non-overlapping-adjacent-channel", you must specify the PHYModel property of the wlanNode object as "full-phy".

Data Types: char | string

Maximum frequency offset for determining interference, specified as a nonnegative scalar. Frequency is measured in Hz. This property specifies the offset between the edge of the receiver operating frequency and the edge of the interfering signal. If you specify this property as Inf, the object considers all signals that overlap in time to be interference, regardless of their frequency. If you specify this property as a nonnegative finite scalar, the object considers signals that overlap with the SOI in time and with the interval [f1MaxInterferenceOffset, f2 + MaxInterferenceOffset] in frequency to be interference. f1 and f2 are starting and ending frequencies of the receiver operation, respectively.

Dependencies

To enable this property, set the InterferenceModeling property to "non-overlapping-adjacent-channel".

Data Types: double | single

This property is read-only.

Channel center frequency in Hz, returned as a positive scalar. This property indicates the operating center frequency of the device that corresponds to the value you specify for the BandAndChannel property.

Examples

collapse all

This example enables you to:

  1. Create and configure a WLAN with an access point (AP) node and a station (STA) node.

  2. Add application traffic from the AP node to the STA node.

  3. Simulate the WLAN and retrieve the statistics of the AP node and the STA node.

Create a wireless network simulator.

networksimulator = wirelessNetworkSimulator.init();

Create a wlanDeviceConfig object, specifying the operating mode and beacon interval. Use this configuration to create a WLAN node and specify its name and position.

deviceCfg = wlanDeviceConfig(Mode="AP",BeaconInterval=5);
apNode = wlanNode(Name="AP",Position=[0 10 0],DeviceConfig=deviceCfg);

Create a WLAN node with the default device configuration. Confirm that the default mode is STA.

staNode = wlanNode(Name="STA",Position=[5 0 0]);

Add a random waypoint mobility model to the WLAN node with the default device configuration. Set the shape of the node's mobility area to "circle".

addMobility(staNode,BoundaryShape="circle",RefreshInterval=0.1)

Associate the STA node with the AP node using the associateStations function.

associateStations(apNode,staNode);

Create a networkTrafficOnOff (Wireless Network Toolbox) object to generate an On-Off application traffic pattern. Specify the data rate in kilobits per second and the packet size in bytes.

traffic = networkTrafficOnOff(DataRate=100,PacketSize=10);

Add application traffic from the AP node to the STA node.

addTrafficSource(apNode,traffic,DestinationNode=staNode);

Add the AP node and STA node to the wireless network simulator.

addNodes(networksimulator,{apNode,staNode});

Set the simulation time in seconds and run the simulation.

simulationTime = 0.5;
run(networksimulator,simulationTime);

Get and display the physical layer (PHY) statistics that correspond to the AP node and STA node.

apStats = statistics(apNode);
staStats = statistics(staNode);
disp(apStats.PHY)
         TransmittedPackets: 345
    TransmittedPayloadBytes: 29594
            ReceivedPackets: 248
       ReceivedPayloadBytes: 3472
             DroppedPackets: 0
disp(staStats.PHY)
         TransmittedPackets: 248
    TransmittedPayloadBytes: 3472
            ReceivedPackets: 345
       ReceivedPayloadBytes: 29594
             DroppedPackets: 0

References

[1] IEEE Std 802.11ax-2021 (Amendment to IEEE Std 802.11™-2020). “Part 11: Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications. Amendment 1: Enhancements for High Efficiency WLAN.” IEEE Standard for Information Technology — Telecommunications and Information Exchange between Systems. Local and Metropolitan Area Networks — Specific Requirements.

Version History

Introduced in R2023a

expand all