wlanDeviceConfig
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
creates a
default WLAN device configuration object.deviceCfg
= wlanDeviceConfig
sets properties of the WLAN device
configuration object using one or more optional name-value arguments. deviceCfg
= wlanDeviceConfig(Name=Value
)
Properties
Mode
— Operating mode of device
"STA"
(default) | "AP"
| "mesh"
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
BandAndChannel
— Operating frequency band and channel number
[5 36]
(default) | row vector of length 2
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, 14] if the frequency band is 2.4 GHz
An integer in the range [1, 200] if the frequency band is 5 GHz
An integer in the range [1, 233] if the frequency band is 6 GHz
Data Types: double
TransmissionFormat
— Physical layer transmission format
"HE-SU"
(default) | "Non-HT"
| "HT-Mixed"
| "VHT"
| "HE-EXT-SU"
| "HE-MU-OFDMA"
| "EHT-SU"
Physical layer (PHY) transmission format, specified as "HE-SU"
,
"Non-HT"
, "HT-Mixed"
, "VHT"
,
"HE-EXT-SU"
, "HE-MU-OFDMA"
, or
"EHT-SU"
. 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.
Dependencies
To enable the
"HE-MU-OFDMA"
value of this property, set the Mode property to"AP"
and theMACFrameAbstraction
property of thewlanNode
object totrue
.To enable the
"EHT-SU"
value of this property, set theMACFrameAbstraction
property of thewlanNode
object totrue
.
Data Types: char
| string
ChannelBandwidth
— Channel bandwidth in Hz
20e6
(default) | 40e6
| 80e6
| 160e6
| 320e6
Channel bandwidth 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
to2.4
, this property supports20e6
Hz and40e6
Hz.If you set the
TransmissionFormat
property to"Non-HT"
or"HE-EXT-SU"
, this property supports only20e6
Hz.If you set the
TransmissionFormat
property to"HT-Mixed"
, this property supports20e6
Hz and40e6
Hz.If you set the
TransmissionFormat
property to"VHT"
,"HE-SU"
, or"HE-MU-OFDMA"
this property supports20e6
Hz,40e6
Hz,80e6
Hz, and160e6
Hz.If you set the
TransmissionFormat
property to"EHT-SU"
, this property supports all channel bandwidths.
Note
Devices operating on the same center frequency must specify an identical value to this property.
Data Types: single
| double
MCS
— Modulation and coding scheme
0
(default) | integer in the range [0, 13]
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"
, 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 theNumSpaceTimeStreams
property.When
TransmissionFormat
is"VHT"
, the range of values is [0, 9]. The set of possible values additionally depends on theChannelBandwidth
andNumSpaceTimeStreams
properties:When
ChannelBandwidth
is20e6
, you can set theMCS
value to9
only whenNumSpaceTimeStreams
is set to3
or6
.When
ChannelBandwidth
is80e6
, theMCS
value6
is not supported whenNumSpaceTimeStreams
is set to3
or7
. TheMCS
value9
is not supported whenNumSpaceTimeStreams
is set to6
.When
ChannelBandwidth
is160e6
, theMCS
value9
is not supported whenNumSpaceTimeStreams
is set to3
.
When
TransmissionFormat
is"HE-EXT-SU"
, the range of values is [0, 2].When
TransmissionFormat
is"HE-SU"
or"HE-MU-OFDMA"
, the range of values is [0, 11].When
TransmissionFormat
is"EHT-SU"
, the range of values is [0, 13].
For broadcast data frame transmissions, set this property to 0
.
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
NumTransmitAntennas
— Number of transmit antennas
1
(default) | integer in the range [1, 8]
Number of transmit antennas, specified as an integer in the range [1, 8]. The device uses the same number of antennas for reception.
Note
All devices in the network must have the same value for this property.
Data Types: single
| double
NumSpaceTimeStreams
— Number of space-time streams
1
(default) | integer in the range [1, 8]
Number of space-time streams, 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
NumTransmitAntennas
value, the node uses the
Fourier spatial mapping to transmit unicast data frames. To transmit broadcast data
frames, set this value to 1
. 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
AggregateHTMPDU
— HT MPDU aggregation selection
1
or true
(default) | 0
or false
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 only when the TransmissionFormat
property is set to
"HT-Mixed"
.
Data Types: logical
MPDUAggregationLimit
— Maximum number of MPDUs in A-MPDU
64
(default) | integer in the range [1, 1024]
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"
and theAggregateHTMPDU
property is set totrue
, the range of values is [0, 64].When
TransmissionFormat
is"VHT"
, the range of values is [0, 64].When
TransmissionFormat
is"HE-SU"
,"HE-EXT-SU"
, or"HE-MU-OFDMA"
, the range of values is [0, 256].When
TransmissionFormat
is"EHT-SU"
, the range of values is [0, 1024].
This property does not apply when TransmissionFormat
is
"Non-HT"
, or when TransmissionFormat
is
"HT-Mixed"
and AggregateHTMPDU
is set to
false
.
Note
All devices in the network must have the same value for this property.
Data Types: single
| double
TransmitQueueSize
— Size of MAC transmission queue
256
(default) | integer scalar in the range [1, 2048]
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 set the TransmissionFormat
property to "EHT-SU"
, the default
value of this property is 1024
.
Data Types: double
ShortRetryLimit
— Maximum number of transmission attempts for a frame
7
(default) | integer in the range [1, 65535]
Maximum number of transmission attempts for a frame, specified as an integer in the range [1, 65535].
Data Types: single
| double
RTSThreshold
— Threshold for RTS transmission
0
(default) | integer in the range [0, 6500631]
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
DisableRTS
— RTS transmission selection
0
or false
(default) | 1
or true
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
DisableACK
— Disable acknowledgements selection
0
or false
(default) | 1
or true
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
CWMin
— Minimum range of contention window for access categories
[15 15 7 3]
(default) | vector of four integers in the range [1, 1023]
Minimum range of contention window for the four access categories (ACs), specified as a vector of four integers in the range [1, 1023]. The four entries are the minimum ranges, in slots, for the Best Effort, Background, Video, and Voice ACs, respectively.
CWMax
— Maximum range of contention window for access categories
[1023 1023 15 7]
(default) | vector of four integers in the range [1, 1023]
Maximum range of contention window for the four ACs, specified as a vector of four integers in the range [1, 1023]. The four entries are the maximum ranges, in slots, for the Best Effort, Background, Video, and Voice ACs, respectively.
AIFS
— Arbitrary interframe space values for access categories
[3 7 2 2]
(default) | vector of four integers in the range [1, 15]
Arbitrary 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"
.
TXOPLimit
— Transmission opportunity duration limit
[0 0 0 0]
(default) | vector of four integers in the range [0, 1023]
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"
.You specify the
TransmissionFormat
property as"HT-Mixed"
and theAggregateHTMPDU
property asfalse
.
Use6MbpsForControlFrames
— 6 Mb/s for control frames selection
0
or false
(default) | 1
or true
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.
Data Types: logical
BasicRates
— Non-HT data rates supported in basic service set
[6 12 24]
(default) | vector which is a subset of [6 9 12 18 24 36 48 54]
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]
.
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
EnableUplinkOFDMA
— Enable AP to trigger UL OFDMA transmissions
0
(false
) (default) | 1
(true
)
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
To enable this property, set the Mode
property to "AP"
and the TransmissionFormat property to "HE-SU"
or
"HE-MU-OFDMA"
.
Data Types: logical
MeshTTL
— Mesh time-to-live
31
(default) | integer in the range [1, 255]
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
TransmitPower
— Transmit power in dBm
10
(default) | real scalar
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
TransmitGain
— Transmit gain in dB
0
(default) | real scalar
Transmit gain in dB, specified as a real scalar.
Data Types: single
| double
ReceiveGain
— Receive gain in dB
0
(default) | real scalar
Receive gain in dB, specified as a real scalar.
Data Types: single
| double
NoiseFigure
— Receiver noise figure in dB
7
(default) | nonnegative scalar
Receiver noise figure in dB, specified as a nonnegative scalar.
Data Types: single
| double
BSSColor
— Color of basic service set
0
(default) | integer in the range [0, 63]
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 you specify:
The
Mode
property to"AP"
. The stations associated with an AP use the same BSS color as the AP.The
TransmissionFormat
property to"HE-SU"
or"HE-EXT-SU"
.
Data Types: single
| double
OBSSPDThreshold
— Overlapping basic service set packet detect threshold in dBm
-82
(default) | scalar in the range [–82, -62]
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 whose BSS color differs from its own, it uses this value to decide whether to ignore the received frame or proceed with inter-BSS frame transmissions.
Dependencies
Data Types: single
| double
BeaconInterval
— Beacon interval in time units (TUs)
Inf
(default) | scalar integer in range [1, 65535]
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
InitialBeaconOffset
— Time offset specified for the first beacon transmission in TUs
[0, BeaconInterval
] (default) | nonnegative scalar integer | nonnegative row vector of [MinTimeOffset,
MaxTimeOffset]
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 [, ].
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
InterferenceModeling
— Type of interference modeling
"co-channel"
(default) | "overlapping-adjacent-channel"
| "non-overlapping-adjacent-channel"
Type of interference modeling, specified as "co-channel"
,
"overlapping-adjacent-channel"
, or
"non-overlapping-adjacent-channel"
. These values mean the
following:
"co-channel"
— The object considers signals with the same center frequency and bandwidth as the signal of interest (SOI) to be interference."overlapping-adjacent-channel"
— In addition to signals that satisfy the condition described under"co-channel"
, the object considers signals that overlap with the SOI in time and frequency to be interference."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 the SOI in time and with the interval [f1 – fd, f2 + fd] in frequency to be interference. f1 and f2 are the starting and ending frequencies of the SOI, respectively. fd is the value of theMaxInterferenceOffset
property.
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
PHYAbstractionMethod
property of the wlanNode
object as
"none"
.
Data Types: char
| string
MaxInterferenceOffset
— Maximum frequency offset for determining interference
0
(default) | nonnegative scalar
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 SOI 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 [f1 – MaxInterferenceOffset
,
f2 + MaxInterferenceOffset
] in frequency to be interference.
Dependencies
This property applies only when InterferenceModeling
is set to
"non-overlapping-adjacent-channel"
.
Data Types: double
| single
ChannelFrequency
— Channel center frequency in Hz
5.1800e+09
(default) | positive scalar
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
Create, Configure, and Simulate Wireless Local Area Network
Simulate a wireless local area network (WLAN) using WLAN Toolbox™ with the Communications Toolbox™ Wireless Network Simulation Library.
In this example, you:
Create and configure a WLAN with an access point (AP) node and a station (STA) node.
Add application traffic from the AP node to the STA node.
Simulate the WLAN and retrieve the statistics of the AP node and the STA node.
Check if the Communications Toolbox™ Wireless Network Simulation Library support package is installed. If the support package is not installed, MATLAB® returns an error with a link to download and install the support package.
wirelessnetworkSupportPackageCheck;
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]);
disp(staNode.DeviceConfig.Mode)
STA
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");
Associate the STA node with the AP node using the associateStations
function.
associateStations(apNode,staNode);
Create a networkTrafficOnOff
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.05; 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: 135 TransmittedPayloadBytes: 6165 ReceivedPackets: 126 ReceivedPayloadBytes: 1764 DroppedPackets: 0
disp(staStats.PHY)
TransmittedPackets: 126 TransmittedPayloadBytes: 1764 ReceivedPackets: 135 ReceivedPayloadBytes: 6165 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 R2023aR2024b: Transmit multiple data frames within a TXOP
You can now transmit multiple data frames within a single transmission opportunity
(TXOP). To use this feature, specify the TXOPLimit
property as a vector with at least one nonzero element.
R2024a: Beacon frame transmission and reception
The wlanDeviceConfig
object now supports transmission and reception of
beacon frames in 802.11 infrastructure and mesh networks. Set the beacon interval and time offset for
the first beacon transmission by configuring the new BeaconInterval
and InitialBeaconOffset
properties, respectively.
R2024a: Adjacent channel interference modeling
You can now model adjacent channel interference. To configure this feature, use the
InterferenceModeling
and MaxInterferenceOffset
properties.
R2023b: 802.11be support
You can now specify the
TransmissionFormat
property as"EHT-SU"
.You can now specify the
ChannelBandwidth
property as320e6
.You can now specify the
MCS
property as12
or13
.You can now specify the
MPDUAggregationLimit
property as an integer in the range [1, 1024].
R2023b: Transmission queue size and uplink OFDMA
Use the
TransmitQueueSize
property to configure the size of the MAC transmission queue.Use the
EnableUplinkOFDMA
property to configure uplink OFDMA transmissions.
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)