802.11ax waveform generation -凯发k8网页登录
this example shows how to parameterize and generate different ieee® 802.11ax™ (wi-fi 6) high efficiency (he) format packets.
introduction
ieee std 802.11ax™-2021 [ 1 ] specifies four high efficiency (he) packet formats:
single-user
extended-range single-user
multi-user
trigger-based
this example shows how packets can be generated for these different formats, and demonstrates some of the key features of the draft standard [ 1 ].
he single-user format
an he single-user (su) packet is a full-band transmission to a single user. the transmit parameters for the he su format are configured using a object. the object can be configured to operate in extended-range mode. to enable or disable this mode, set the extendedrange
property to true
or false
. in this example we create a configuration for an he su transmission and configure transmission properties.
cfgsu = wlanhesuconfig; cfgsu.extendedrange = false; % do not use extended-range format cfgsu.channelbandwidth = 'cbw20'; % channel bandwidth cfgsu.apeplength = 1000; % payload length in bytes cfgsu.mcs = 0; % modulation and coding scheme cfgsu.channelcoding = 'ldpc'; % channel coding cfgsu.numspacetimestreams = 1; % number of space-time streams cfgsu.numtransmitantennas = 1; % number of transmit antennas
a single-user packet can be generated with the waveform generator, . the getpsdulength()
method returns the required psdu length given the transmission configuration. this length is used to create a random psdu for transmission.
psdu = randi([0 1],getpsdulength(cfgsu)*8,1,'int8'); % random psdu txsuwaveform = wlanwaveformgenerator(psdu,cfgsu); % create packet
he extended-range single-user format
an extended-range single-user packet has the same fields as the standard single-user format, but the powers of some fields are boosted, and some fields are repeated to improve performance at low snrs. an extended-range packet can be configured using a object with channelbandwidth
set to 'cbw20'
and extendedrange
set to true
. an extended-range packet has an option to only transmit in the upper 106-tone resource unit (ru) within the 20 mhz channel, or over the entire bandwidth. this can be configured with the upper106toneru
property:
cfgextsu = cfgsu; cfgextsu.extendedrange = true; % enable extended-range format cfgextsu.upper106toneru = true; % use only upper 106-tone ru % generate a packet psdu = randi([0 1],getpsdulength(cfgextsu)*8,1,'int8'); % random psdu txextsuwaveform = wlanwaveformgenerator(psdu,cfgextsu); % create packet
look at the spectrum and spectrogram of the generated signal. in the spectrogram you can see that the packet headers use the available bandwidth, however, the data portion only occupies the upper half of the channel.
fs = wlansamplerate(cfgextsu); % get baseband sample rate ofdminfo = wlanheofdminfo('he-data',cfgextsu); fftsize = ofdminfo.fftlength; % use the data field fft size rbw = fs/fftsize; % resoluton bandwidth spectrumscope = spectrumanalyzer(samplerate=fs,... rbwsource='property',rbw=rbw,... averagingmethod='exponential',forgettingfactor=0.25,... ylimits=[-50,20],... title='he extended-range su with active upper 106-tone ru'); spectrumscope.viewtype = 'spectrum and spectrogram'; spectrumscope.timespansource = 'property'; spectrumscope.timespan = length(txextsuwaveform)/fs; spectrumscope(txextsuwaveform)
if you compare the power of the l-stf and l-ltf fields you can see that the extended-range transmission is boosted by 3 db.
figure; ind = wlanfieldindices(cfgextsu); t = (0:(double(ind.lltf(2))-1))/fs*1e6; plot(t,20*log10(movmean(abs(txsuwaveform(1:ind.lltf(2))),20)),'-b') hold on; plot(t,20*log10(movmean(abs(txextsuwaveform(1:ind.lltf(2))),20)),'-r') grid on; title('power of l-stf and l-ltf (1 us moving average)'); xlabel('time (us)'); ylabel('power (dbw)'); legend('he su','he extended-range su','location','southwest');
he multi-user format - ofdma
the he multi-user (he mu) format can be configured for an ofdma transmission, a mu-mimo transmission, or a combination of the two. this flexibility allows an he mu packet to transmit to a single user over the whole band, multiple users over different parts of the band (ofdma), or multiple users over the same part of the band (mu-mimo).
for an ofdma transmission, the channel bandwidth is divided into resource units (rus). an ru is a group of subcarriers assigned to one or more users. an ru is defined by a size (the number of subcarriers) and an index. the ru index specifies the location of the ru within the channel. for example, in an 80 mhz transmission there are four possible 242-tone rus, one in each 20 mhz subchannel. ru# 242-1 (size 242, index 1) is the ru occupying the lowest absolute frequency within the 80 mhz, and ru# 242-4 (size 242, index 4) is the ru occupying the highest absolute frequency. the draft standard defines possible sizes and locations of rus in section 27.3.2.2 of [ 1 ].
the assignment of rus in a transmission is defined by the allocation index. the allocation index is defined in table 27-26 of [ 1 ]. for each 20 mhz subchannel, an 8-bit index describes the number and size of rus, and the number of users transmitted on each ru. the allocation index also determines which content channel is used to signal a user in he-sig-b. the allocation indices within table 27-26, and the corresponding ru assignments, are provided in the table returned by the function heruallocationtable
. the first 10 allocations within the table are shown below. for each allocation index, the 8-bit allocation index, the number of users, number of rus, ru indices, ru sizes, and number of users per ru are displayed. a note is also provided about allocations which are reserved, or serve a special purpose. the allocation table can also be viewed in the appendix.
allocationtable = heruallocationtable;
disp('first 10 entries in the allocation table: ')
disp(allocationtable(1:10,:));
first 10 entries in the allocation table: allocation bitallocation numusers numrus ruindices rusizes numusersperru note __________ _____________ ________ ______ _____________________ ______________________________ _____________________ ____ 0 "00000000" 9 9 {[1 2 3 4 5 6 7 8 9]} {[26 26 26 26 26 26 26 26 26]} {[1 1 1 1 1 1 1 1 1]} "" 1 "00000001" 8 8 {[ 1 2 3 4 5 6 7 4]} {[ 26 26 26 26 26 26 26 52]} {[ 1 1 1 1 1 1 1 1]} "" 2 "00000010" 8 8 {[ 1 2 3 4 5 3 8 9]} {[ 26 26 26 26 26 52 26 26]} {[ 1 1 1 1 1 1 1 1]} "" 3 "00000011" 7 7 {[ 1 2 3 4 5 3 4]} {[ 26 26 26 26 26 52 52]} {[ 1 1 1 1 1 1 1]} "" 4 "00000100" 8 8 {[ 1 2 2 5 6 7 8 9]} {[ 26 26 52 26 26 26 26 26]} {[ 1 1 1 1 1 1 1 1]} "" 5 "00000101" 7 7 {[ 1 2 2 5 6 7 4]} {[ 26 26 52 26 26 26 52]} {[ 1 1 1 1 1 1 1]} "" 6 "00000110" 7 7 {[ 1 2 2 5 3 8 9]} {[ 26 26 52 26 52 26 26]} {[ 1 1 1 1 1 1 1]} "" 7 "00000111" 6 6 {[ 1 2 2 5 3 4]} {[ 26 26 52 26 52 52]} {[ 1 1 1 1 1 1]} "" 8 "00001000" 8 8 {[ 1 3 4 5 6 7 8 9]} {[ 52 26 26 26 26 26 26 26]} {[ 1 1 1 1 1 1 1 1]} "" 9 "00001001" 7 7 {[ 1 3 4 5 6 7 4]} {[ 52 26 26 26 26 26 52]} {[ 1 1 1 1 1 1 1]} ""
a object is used to configure the transmission of an he mu packet. the allocation index for each 20 mhz subchannel must be provided when creating an he mu configuration object, . an integer between 0 and 223, corresponding to the 8-bit number in table 27-26 of [ 1 ], must be provided for each 20 mhz subchannel.
the allocation index can be provided as a decimal or 8-bit binary sequence. in this example, a 20 mhz he mu configuration is created with 8-bit allocation index "10000000". this is equivalent to the decimal allocation index 128. this configuration specifies 3 rus, each with one user.
allocationindex = "10000000"; % 3 rus, 1 user per ru cfgmu = wlanhemuconfig(allocationindex);
the showallocation
method visualizes the occupied rus and subcarriers for the specified configuration. the colored blocks illustrate the occupied subcarriers in the pre-he and he portions of the packet. white indicates subcarriers are unoccupied. the pre-he portion illustrates the occupied subcarriers in the fields preceding he-stf. the he portion illustrates the occupied subcarriers in the he-stf, he-ltf and he-data field and therefore shows the ru allocation. clicking on an ru will display information about the ru. the ru number corresponds to the i-th ru element of the cfgmu.ru
property. the size and index are the details of the ru. the ru index is the i-th possible ru of the corresponding ru size within the channel bandwidth, for example index 2 is the 2nd possible 106-tone ru within the 20 mhz channel bandwidth. the user number corresponds to the i-th user element of the cfgmu.user
property, and the user field in he-sig-b. note the middle ru (ru #2) is split across the dc subcarriers.
showallocation(cfgmu);
axalloc = gca; % get axis handle for subsequent plotting
the ruinfo
method provides details of the rus in the configuration. in this case we can see three users and three rus.
allocinfo = ruinfo(cfgmu);
disp('allocation info:')
disp(allocinfo)
allocation info: numusers: 3 numrus: 3 ruindices: [1 5 2] rusizes: [106 26 106] numusersperru: [1 1 1] numspacetimestreamsperru: [1 1 1] powerboostfactorperru: [1 1 1] runumbers: [1 2 3]
the properties of cfgmu
describe the transmission configuration. the cfgmu.ru
and cfgmu.user
properties of cfgmu
are cell arrays. each element of the cell arrays contains an object which configures an ru or a user. when the cfgmu
object is created, the elements of cfgmu.ru
and cfgmu.user
are configured to create the desired number of rus and users. each element of cfgmu.ru
is a object describing the configuration of an ru. similarly, each element of cfgmu.user
is a object describing the configuration of a user. this object hierarchy is shown below:
in this example, three rus are specified by the allocation index 128, therefore cfgmu.ru
is a cell array with three elements. the index and size of each ru are configured according to the allocation index used to create cfgmu
. after the object is created, each ru can be configured to create the desired transmission configuration, by setting the properties of the appropriate ru object. for example, the spatial mapping and power boost factor can be configured per ru. the size
and index
properties of each ru are fixed once the object is created, and therefore are read-only properties. similarly, the usernumbers
property is read-only and indicates which user is transmitted on the ru. for this configuration the first ru is size 106, index 1.
disp('first ru configuration:')
disp(cfgmu.ru{1})
first ru configuration: wlanhemuru with properties: powerboostfactor: 1 spatialmapping: 'direct' read-only properties: size: 106 index: 1 usernumbers: 1
in this example, the allocation index specifies three users in the transmission, therefore, cfgmu.user
contains three elements. the transmission properties of users can be configured by modifying individual user objects, for example the mcs, apep length and channel coding scheme. the read-only runumber
property indicates which ru is used to transmit this user.
disp('first user configuration:')
disp(cfgmu.user{1})
first user configuration: wlanhemuuser with properties: apeplength: 100 mcs: 0 numspacetimestreams: 1 dcm: 0 channelcoding: 'ldpc' staid: 0 nominalpacketpadding: 0 postfecpaddingsource: 'mt19937ar with seed' postfecpaddingseed: 1 read-only properties: runumber: 1
the number of users per ru, and mapping of users to rus is determined by the allocation index. the usernumbers
property of an ru object indicates which users (elements of the cfgmu.user
cell array) are transmitted on that ru. similarly, the runumber
property of each user object, indicates which ru (element of the cfgmu.ru
cell array) is used to transmit the user:
this allows the properties of an ru associated with a user to be accessed easily:
runum = cfgmu.user{2}.runumber; % get the ru number associated with user 2 disp(cfgmu.ru{runum}.spatialmapping); % display the spatial mapping
direct
when an ru serves multiple users, in a mu-mimo configuration, the usernumbers
property can index multiple users:
once the cfgmu
object is created, transmission parameters can be set as demonstrated below.
% configure ru 1 and user 1 cfgmu.ru{1}.spatialmapping = 'direct'; cfgmu.user{1}.apeplength = 1e3; cfgmu.user{1}.mcs = 2; cfgmu.user{1}.numspacetimestreams = 4; cfgmu.user{1}.channelcoding = 'ldpc'; % configure ru 2 and user 2 cfgmu.ru{2}.spatialmapping = 'fourier'; cfgmu.user{2}.apeplength = 500; cfgmu.user{2}.mcs = 3; cfgmu.user{2}.numspacetimestreams = 2; cfgmu.user{2}.channelcoding = 'ldpc'; % configure ru 3 and user 3 cfgmu.ru{3}.spatialmapping = 'fourier'; cfgmu.user{3}.apeplength = 100; cfgmu.user{3}.mcs = 4; cfgmu.user{3}.dcm = true; cfgmu.user{3}.numspacetimestreams = 1; cfgmu.user{3}.channelcoding = 'bcc';
some transmission parameters are common for all users in the he mu transmission.
% configure common parameters for all users
cfgmu.numtransmitantennas = 4;
cfgmu.sigbmcs = 2;
to generate the he mu waveform, we first create a random psdu for each user. a cell array is used to store the psdu for each user as the psdu lengths differ. the getpsdulength()
method returns a vector with the required psdu per user given the configuration. the waveform generator is then used to create a packet.
psdulength = getpsdulength(cfgmu); psdu = cell(1,allocinfo.numusers); for i = 1:allocinfo.numusers psdu{i} = randi([0 1],psdulength(i)*8,1,'int8'); % generate random psdu end % create mu packet txmuwaveform = wlanwaveformgenerator(psdu,cfgmu);
to configure an ofdma transmission with a channel bandwidth greater than 20 mhz, an allocation index must be provided for each 20 mhz subchannel. for example, to configure an 80 mhz ofdma transmission, four allocation indices are required. in this example four 242-tone rus are configured. the allocation index 192
specifies one 242-tone ru with a single user in a 20 mhz subchannel, therefore the allocation indices [192 192 192 192]
are used to create four of these rus, over 80 mhz:
% display 192 allocation index properties in the table (the 193rd row) disp('allocation #192 table entry:') disp(allocationtable(193,:)) % create 80 mhz mu configuration, with four 242-tone rus cfgmu80mhz = wlanhemuconfig([192 192 192 192]);
allocation #192 table entry: allocation bitallocation numusers numrus ruindices rusizes numusersperru note __________ _____________ ________ ______ _________ _______ _____________ ____ 192 "11000000" 1 1 {[1]} {[242]} {[1]} ""
when multiple 20 mhz subchannels are specified, the channelbandwidth
property is set to the appropriate value. for this configuration it is set to 'cbw80'
as four 20 mhz subchannels are specified. this is also visible in the allocation plot.
disp('channel bandwidth for he mu allocation:')
disp(cfgmu80mhz.channelbandwidth)
showallocation(cfgmu80mhz,axalloc)
channel bandwidth for he mu allocation: cbw80
he multi-user format - mu-mimo
an he mu packet can also transmit an ru to multiple users using mu-mimo. for a full band mu-mimo allocation, the allocation indices between 192 and 199 configure a full-band 20 mhz allocation (242-tone ru). the index within this range determines how many users are configured. the allocation details can be viewed in the allocation table. note the numusers
column in the table grows with index but the numrus
is always 1. the allocation table can also be viewed in the appendix.
disp('allocation #192-199 table entries:') disp(allocationtable(193:200,:)) % indices 192-199 (rows 193 to 200)
allocation #192-199 table entries: allocation bitallocation numusers numrus ruindices rusizes numusersperru note __________ _____________ ________ ______ _________ _______ _____________ ____ 192 "11000000" 1 1 {[1]} {[242]} {[1]} "" 193 "11000001" 2 1 {[1]} {[242]} {[2]} "" 194 "11000010" 3 1 {[1]} {[242]} {[3]} "" 195 "11000011" 4 1 {[1]} {[242]} {[4]} "" 196 "11000100" 5 1 {[1]} {[242]} {[5]} "" 197 "11000101" 6 1 {[1]} {[242]} {[6]} "" 198 "11000110" 7 1 {[1]} {[242]} {[7]} "" 199 "11000111" 8 1 {[1]} {[242]} {[8]} ""
the allocation index 193
transmits a 20 mhz 242-tone ru to two users. in this example, we will create a transmission with a random spatial mapping matrix which maps a single space-time stream for each user, onto two transmit antennas.
% configure 2 users in a 20 mhz channel cfgmumimo = wlanhemuconfig(193); % set the transmission properties of each user cfgmumimo.user{1}.apeplength = 100; % bytes cfgmumimo.user{1}.mcs = 2; cfgmumimo.user{1}.channelcoding = 'ldpc'; cfgmumimo.user{1}.numspacetimestreams = 1; cfgmumimo.user{2}.apeplength = 1000; % bytes cfgmumimo.user{2}.mcs = 6; cfgmumimo.user{2}.channelcoding = 'ldpc'; cfgmumimo.user{2}.numspacetimestreams = 1; % get the number of occupied subcarriers in the ru ruindex = 1; % get the info for the first (and only) ru ofdminfo = wlanheofdminfo('he-data',cfgmumimo,ruindex); numst = ofdminfo.numtones; % number of occupied subcarriers % set the number of transmit antennas and generate a random spatial mapping % matrix numtx = 2; allocinfo = ruinfo(cfgmumimo); numsts = allocinfo.numspacetimestreamsperru(ruindex); cfgmumimo.numtransmitantennas = numtx; cfgmumimo.ru{ruindex}.spatialmapping = 'custom'; cfgmumimo.ru{ruindex}.spatialmappingmatrix = rand(numst,numsts,numtx); % create packet with a repeated bit sequence as the psdu txmumimowaveform = wlanwaveformgenerator([1 0 1 0],cfgmumimo);
a full band mu-mimo transmission with a channel bandwidth greater than 20 mhz is created by providing a single ru allocation index within the range 200-223 when creating the object. for these allocations he-sig-b compression is used.
the allocation indices between 200 and 207 configure a full-band mu-mimo 40 mhz allocation (484-tone ru). the index within this range determines how many users are configured. the allocation details can be viewed in the allocation table. note the numusers
column in the table grows with index but the numrus
is always 1.
disp('allocation #200-207 table entries:') disp(allocationtable(201:208,:)) % indices 200-207 (rows 201 to 208)
allocation #200-207 table entries: allocation bitallocation numusers numrus ruindices rusizes numusersperru note __________ _____________ ________ ______ _________ _______ _____________ ____ 200 "11001000" 1 1 {[1]} {[484]} {[1]} "" 201 "11001001" 2 1 {[1]} {[484]} {[2]} "" 202 "11001010" 3 1 {[1]} {[484]} {[3]} "" 203 "11001011" 4 1 {[1]} {[484]} {[4]} "" 204 "11001100" 5 1 {[1]} {[484]} {[5]} "" 205 "11001101" 6 1 {[1]} {[484]} {[6]} "" 206 "11001110" 7 1 {[1]} {[484]} {[7]} "" 207 "11001111" 8 1 {[1]} {[484]} {[8]} ""
similarly, the allocation indices between 208 and 215 configure a full-band mu-mimo 80 mhz allocation (996-tone ru), and the allocation indices between 216 and 223 configure a full-band mu-mimo 160 mhz allocation (2x996-tone ru).
as an example, the allocation index 203
specifies a 484-tone ru with 4 users:
cfg484mu = wlanhemuconfig(203); showallocation(cfg484mu,axalloc)
he multi-user format - ofdma with ru sizes greater than 242 subcarriers
for an he mu transmission with a channel bandwidth greater than 20 mhz, two he-sig-b content channels are used to signal user configurations. these content channels are duplicated over each 40 mhz subchannel for larger channel bandwidths, as described in section 27.3.11.8.5 of [ 1 ]. when an ru size greater than 242 is specified as part of an ofdma system, the users assigned to the ru can be signaled on either of the two he-sig-b content channels. the allocation index provided when creating an object controls which content channel each user is signaled on. the allocation table in the appendix shows the relevant allocation indices.
as an example, consider the following 80 mhz configuration which serves 7 users:
one 484-tone ru (ru #1) with four users (users #1-4)
one 242-tone ru (ru #2) with one user (user #5)
two 106-tone rus (ru #3 and #4), each with one user (users #6 and #7)
to configure an 80 mhz ofdma transmission, four allocation indices are required, one for each 20 mhz subchannel. to configure the above scenario the allocation indices below are used:
[x y 192 96]
x
andy
configure the 484-tone ru, with users #1-4. the possible values ofx
andy
are discussed below.192
configures a 242-tone ru with one user, user #5.96
signals two 106-tone rus, each with one user, users #6 and #7.
the selection of x
and y
configures the appropriate number of users in the 242-tone ru, and determines which he-sig-b content channel is used to signal the users. a 484-tone ru spans two 20 mhz subchannels, therefore two allocation indices are required. all seven users from the four rus will be signaled on the he-sig-b content channels, but for now we will only consider the signaling of users on the 484-tone ru. for the 484-tone ru, the four users can be signaled on the two he-sig-b content channels in different combinations as shown in table 1.
an allocation index within the range 200-207 specifies 1-8 users on a 484-tone ru. to signal no users on a content channel, the allocation index 114
or 115
can be used, for a 484-tone or 996-tone ru. therefore, the combinations in table 1 can be defined using two allocation indices as shown in table 2. the two allocation indices in each row of table 2 are x
and y
.
therefore, to configure 'combination e' the following 80 mhz allocation indices are used:
[114 203 192 96]
114
and203
configure the 484-tone ru, with users #1-4.192
configures a 242-tone ru with one user, user #5.96
signals two 106-tone rus, each with one user, users #6 and #7.
cfg484ofdma = wlanhemuconfig([114 203 192 96]); showallocation(cfg484ofdma,axalloc);
to view the he-sig-b allocation signaling, use the heplothesigballocationmapping
function. this shows the user fields signaled on each he-sig-b content channel, and which ru and user in the object, each user field signals. in this case we can see the users on ru #1, 3 and 4 are all signaled on content channel 2, and the user of ru #2 is signaled on content channel 1. the second content channel signals six users, while the first content channel only signals one user. therefore, the first content channel will be padded up to the length of the second for transmission. in the diagram, the ru allocation information is provided in the form index-size, e.g. ru8-106 is the 8th 106-tone ru.
figure;
heplothesigballocationmapping(cfg484ofdma);
axsigb = gca; % get axis handle for subsequent plotting
to balance the user field signaling in he-sig-b, we can use 'combination b' in table 2 when creating the allocation index for the 484-tone ru. this results in two users being signaled on each content channel of he-sig-b, creating a better balance of user fields, and potentially fewer he-sig-b symbols in the transmission.
cfg484ofdmabalanced = wlanhemuconfig([201 201 96 192]); heplothesigballocationmapping(cfg484ofdmabalanced,axsigb);
he multi-user format - central 26-tone ru
in an 80 mhz transmission, when a full band ru is not used, the central 26-tone ru can be optionally active. the central 26-tone ru is enabled using a name-value pair when creating the object.
% create a configuration with no central 26-tone ru cfgnocentral = wlanhemuconfig([192 192 192 192],'lowercenter26toneru',false); showallocation(cfgnocentral,axalloc); % create a configuration with a central 26-tone ru cfgcentral = wlanhemuconfig([192 192 192 192],'lowercenter26toneru',true); showallocation(cfgcentral,axalloc);
similarly, for a 160 mhz transmission, the central 26-tone ru in each 80 mhz segment can be optionally used. each central 26-tone ru can be enabled using name-value pairs when creating the object. in this example only the upper central 26-tone ru is created. four 242-tone rus, each with one user are specified with the allocation index [200 114 114 200 200 114 114 200]
.
cfgcentral160mhz = wlanhemuconfig([200 114 114 200 200 114 114 200],'uppercenter26toneru',true);
disp(cfgcentral160mhz)
wlanhemuconfig with properties: ru: {1x5 cell} user: {1x5 cell} primarysubchannel: 1 numtransmitantennas: 1 stbc: 0 guardinterval: 3.2000 heltftype: 4 sigbmcs: 0 sigbdcm: 0 uplinkindication: 0 bsscolor: 0 spatialreuse: 0 txopduration: 127 highdoppler: 0 read-only properties: channelbandwidth: 'cbw160' allocationindex: [200 114 114 200 200 114 114 200] lowercenter26toneru: 0 uppercenter26toneru: 1
he multi-user format - preamble puncturing
in an 80 mhz or 160 mhz transmission, 20 mhz subchannels can be punctured to allow a legacy system to operate in the punctured channel. this method is also described as channel bonding. to null a 20 mhz subchannel the 20 mhz subchannel allocation index 113
can be used. the punctured 20 mhz subchannel can be viewed with the showallocation
method.
% null second lowest 20 mhz subchannel in a 160 mhz configuration cfgnull = wlanhemuconfig([192 113 114 200 208 115 115 115]); % plot the allocation showallocation(cfgnull,axalloc);
the punctured 20 mhz can also be viewed with the generated waveform and the spectrum analyzer.
% set the transmission properties of each user in all rus cfgnull.user{1}.apeplength = 100; cfgnull.user{1}.mcs = 2; cfgnull.user{1}.channelcoding = 'ldpc'; cfgnull.user{1}.numspacetimestreams = 1; cfgnull.user{2}.apeplength = 1000; cfgnull.user{2}.mcs = 6; cfgnull.user{2}.channelcoding = 'ldpc'; cfgnull.user{2}.numspacetimestreams = 1; cfgnull.user{3}.apeplength = 100; cfgnull.user{3}.mcs = 1; cfgnull.user{3}.channelcoding = 'ldpc'; cfgnull.user{3}.numspacetimestreams = 1; % create packet txnullwaveform = wlanwaveformgenerator([1 0 1 0],cfgnull); % visualize signal spectrum fs = wlansamplerate(cfgnull); ofdminfo = wlanheofdminfo('he-data',cfgnull,1); fftsize = ofdminfo.fftlength; spectrumscope = spectrumanalyzer(samplerate=fs,... averagingmethod='exponential',forgettingfactor=0.99,... rbwsource='property',rbw=fs/fftsize,... title='160 mhz he mu transmission with punctured 20 mhz channel'); spectrumscope(txnullwaveform);
trigger-based mu format
the he trigger-based (tb) format allows for ofdma or mu-mimo transmission in the uplink. each station (sta) transmits a tb packet simultaneously, when triggered by the access point (ap). a tb transmission is controlled entirely by the ap. all the parameters required for the transmission are provided in a trigger frame to all stas participating in the tb transmission. in this example a tb transmission in response to a trigger frame for three users in an ofdma/mu-mimo system is configured; three stas will transmit simultaneously to an ap.
the 20 mhz allocation 97
is used which corresponds to two rus, one of which serves two users in mu-mimo.
disp('allocation #97 table entry:') disp(allocationtable(98,:)) % index 97 (row 98)
allocation #97 table entry: allocation bitallocation numusers numrus ruindices rusizes numusersperru note __________ _____________ ________ ______ _________ ___________ _____________ ____ 97 "01100001" 3 2 {[1 2]} {[106 106]} {[1 2]} ""
the allocation information is obtained by creating a mu configuration with .
% generate an ofdma allocation
cfgmu = wlanhemuconfig(97);
allocationinfo = ruinfo(cfgmu);
in a tb transmission several parameters are the same for all users in the transmission. some of these are specified below:
% these parameters are the same for all users in the ofdma system trgmethod = 'triggerframe'; % method used to trigger an he tb ppdu channelbandwidth = cfgmu.channelbandwidth; % bandwidth of ofdma system lsiglength = 142; % l-sig length prefecpaddingfactor = 2; % pre-fec padding factor ldpcextrasymbol = false; % ldpc extra symbol numheltfsymbols = 2; % number of he-ltf symbols
a tb transmission for a single user within the system is configured with a object. in this example, a cell array of three objects is created to describe the transmission of the three users.
% create a trigger configuration for each user
numusers = allocationinfo.numusers;
cfgtriggeruser = repmat({wlanhetbconfig},1,numusers);
the non-default system-wide properties are set for each user.
for useridx = 1:numusers cfgtriggeruser{useridx}.triggermethod = trgmethod; cfgtriggeruser{useridx}.channelbandwidth = channelbandwidth; cfgtriggeruser{useridx}.lsiglength = lsiglength; cfgtriggeruser{useridx}.prefecpaddingfactor = prefecpaddingfactor; cfgtriggeruser{useridx}.ldpcextrasymbol = ldpcextrasymbol; cfgtriggeruser{useridx}.numheltfsymbols = numheltfsymbols; end
next the per-user properties are set. when multiple users are transmitting in the same ru, in a mu-mimo configuration, each user must transmit on different space-time stream indices. the properties startingspacetimestream
and numspacetimestreamsteams
must be set for each user to make sure different space-time streams are used. in this example user 1 and 2 are in a mu-mimo configuration, therefore startingspacetimestream
for user two is set to 2
, as user one is configured to transmit 1 space-time stream with startingspacetimestream = 1
.
% these parameters are for the first user - ru#1 mu-mimo user 1 cfgtriggeruser{1}.rusize = allocationinfo.rusizes(1); cfgtriggeruser{1}.ruindex = allocationinfo.ruindices(1); cfgtriggeruser{1}.mcs = 4; % modulation and coding scheme cfgtriggeruser{1}.numspacetimestreams = 1; % number of space-time streams cfgtriggeruser{1}.numtransmitantennas = 1; % number of transmit antennas cfgtriggeruser{1}.startingspacetimestream = 1; % the starting index of the space-time streams cfgtriggeruser{1}.channelcoding = 'ldpc'; % channel coding % these parameters are for the second user - ru#1 mu-mimo user 2 cfgtriggeruser{2}.rusize = allocationinfo.rusizes(1); cfgtriggeruser{2}.ruindex = allocationinfo.ruindices(1); cfgtriggeruser{2}.mcs = 3; % modulation and coding scheme cfgtriggeruser{2}.numspacetimestreams = 1; % number of space-time streams cfgtriggeruser{2}.startingspacetimestream = 2; % the starting index of the space-time streams cfgtriggeruser{2}.numtransmitantennas = 1; % number of transmit antennas cfgtriggeruser{2}.channelcoding = 'ldpc'; % channel coding % these parameters are for the third user - ru#2 cfgtriggeruser{3}.rusize = allocationinfo.rusizes(2); cfgtriggeruser{3}.ruindex = allocationinfo.ruindices(2); cfgtriggeruser{3}.mcs = 4; % modulation and coding scheme cfgtriggeruser{3}.numspacetimestreams = 2; % number of space-time streams cfgtriggeruser{3}.startingspacetimestream = 1; % the starting index of the space-time streams cfgtriggeruser{3}.numtransmitantennas = 2; % number of transmit antennas cfgtriggeruser{3}.channelcoding = 'bcc'; % channel coding
a packet containing random data is now transmitted by each user with . the waveform transmitted by each user is stored for analysis.
trigind = wlanfieldindices(cfgtriggeruser{1}); % get the indices of each field txtrigstore = zeros(trigind.hedata(2),numusers); for useridx = 1:numusers % generate waveform for a user cfgtrigger = cfgtriggeruser{useridx}; txpsdu = randi([0 1],getpsdulength(cfgtrigger)*8,1); txtrig = wlanwaveformgenerator(txpsdu,cfgtrigger); % store the transmitted sta waveform for analysis txtrigstore(:,useridx) = sum(txtrig,2); end
the spectrum of the transmitted waveform from each sta shows the different portions of the spectrum used, and the overlap in the mu-mimo ru.
fs = wlansamplerate(cfgtriggeruser{1}); ofdminfo = wlanheofdminfo('he-data',cfgtriggeruser{1}); spectrumscope = spectrumanalyzer(samplerate=fs,... method='welch',... averagingmethod='exponential',forgettingfactor=0,... channelnames={'ru#1 user 1','ru#1 user 2','ru#2'},... showlegend=true,title='transmitted he tb waveform per user'); spectrumscope(txtrigstore);
appendix
the ru allocation table for allocations <= 20 mhz is shown below, with annotated descriptions.
the ru allocation and he-sig-b user signaling for allocations > 20 mhz is shown in the table below, with annotated descriptions.
selected bibliography
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.