802.11ax phy-凯发k8网页登录
this example shows how to perform a phy-focused system-level simulation for ieee® 802.11ax™ (wi-fi 6). part (a) validates the simulation scenario, radio characteristics, and large-scale fading model by comparing against published calibration results. part (b) estimates the packet error rate of the 802.11ax network by simulating individual links between active nodes under a basic clear channel assessment scheme.
introduction
in this example the performance of an 802.11ax [ 1 ] network in a residential apartment block is evaluated using a phy-focused system-level simulation.
the residential apartment block simulation scenario is specified in [ 2 ]. this consists of a building with five floors, and twenty 10m x 10m x 3m apartments per floor. each apartment has an access point (ap) and one or more stations (stas) placed in random xy-locations, a process referred to as 'dropping' nodes. this creates a basic service set (bss) per apartment which is randomly assigned one of three channels. the simulation scenario specifies a large-scale path loss model based on the distance between nodes, and the number of walls and floors traversed.
the tgax evaluation methodology [ 3 ] for 'phy system simulation' is followed for this example:
aps and stas are randomly 'dropped' within the scenario.
for each pair of nodes, the large-scale path loss is calculated.
one or more 'transmission events' is performed. each transmission event consists of selecting active aps and stas based on channel access rules and determining the performance of each link.
this example consists of two parts:
in part (a), the 'calibration' stage, the signal-to-interference-plus-noise ratio (sinr) is calculated for multiple 'drops', assuming downlink interfering transmissions. sinr captures long-term radio characteristics. the cumulative distribution function (cdf) of the sinr is compared with published results from the tgax task group [ 4 ].
in part (b), the 'phy system-level simulation' stage, for each transmission event the phy layer is modeled for individual links. a basic clear channel assessment (cca) scheme is used to control which aps are active. waveforms for the signal of interest and interference, impaired by fading channel models, are generated and combined. the resultant packets are processed by a receiver to recover the packet of interest. the average packet error rate for the network is calculated.
the two parts of this example can be disabled using the parameters calibrate
and systemlevelsimulation
. a figure displaying the simulation scenarios, nodes, active links, and interference is displayed when showscenarioplot
is true.
calibrate = true; % to execute part a calibration test systemlevelsimulation = true; % to execute part b system-level simulation showscenarioplot = true; % to show dynamic simulation plotting updates
simulation parameters
the major simulation parameters are defined as either belonging to physical layer (phy), medium access control layer (mac), scenario, or simulation. in this example the phy and mac parameters are assumed to be the same for all nodes.
phyparameters = struct; phyparameters.txpower = 20; % transmitter power in dbm phyparameters.txgain = 0; % transmitter antenna gain in dbi phyparameters.rxgain = -2; % receiver antenna gain in dbi phyparameters.noisefigure = 7; % receiver noise figure in db phyparameters.numtxantennas = 1; % number of transmitter antennas phyparameters.numrxantennas = 1; % number of receiver antennas phyparameters.channelbandwidth = 'cbw80'; % bandwidth of system phyparameters.transmitterfrequency = 5e9; % transmitter frequency in hz macparameters = struct; macparameters.numchannels = 3; % number of non-overlapping channels macparameters.ccalevel = -70; % transmission threshold in cca algorithm (dbm)
the scenario parameters define the size and layout of the residential building as per [3].
% number of rooms in [x,y,z] directions scenarioparameters = struct; scenarioparameters.buildinglayout = [10 2 5]; % size of each room in meters [x,y,z] scenarioparameters.roomsize = [10 10 3]; % number of receivers per room. note that only one receiver (sta) can be % active at any given time. scenarioparameters.numrxperroom = 1;
the numdrops
and numtxeventsperdrop
parameters control the length of the simulation. for this example, these parameters are configured for a short simulation, but for meaningful results these should be increased.
a 'drop' randomly places transmitters and receivers within the scenario and selects the channel for a bss. a 'transmission' event randomly selects transmitters and receivers for transmissions according to basic channel access rules.
simparameters = struct; simparameters.numdrops = 3; simparameters.numtxeventsperdrop = 2;
generate transmitter sites
before the main body of the simulation, the transmitter site objects txsite
are generated and assigned room names of the form 'room#' for ease of reference. one transmitter (ap) per room is assumed. each transmitter is assumed to be isotropic.
% total number of transmitters, assuming one transmitter (tx) per room numtx = prod(scenarioparameters.buildinglayout); % create transmitter sites with and isotropic antenna element roomnames = strings(1,numtx); for siteind = 1:numtx roomnames(siteind) = "room " siteind; end txs = txsite('cartesian','name',roomnames,... 'transmitterfrequency',phyparameters.transmitterfrequency, ... 'transmitterpower',10.^((phyparameters.txpower phyparameters.txgain-30)/10),... 'antenna','isotropic');
generate receiver sites
the receive site objects rxsite
are generated and assigned names of the form 'room#-sta#' for ease of reference. the scenario parameter numrxperroom
is used to define how many receivers (stas) are present in each room. each receiver is assumed to be isotropic.
% total number of receivers, assuming one transmitter (tx) per room numrx = numtx*scenarioparameters.numrxperroom; % create receiver sites roomnames = strings(1,numrx); for siteind = 1:numrx roomnames(siteind) = "room " (mod(siteind-1,numtx) 1) "-" ceil(siteind/numtx); end rxs = rxsite('cartesian','name',roomnames,'antenna','isotropic'); % receiver noise power in dbm t = 290; % temperature (kelvin) k = physconst('boltzmann'); % boltzmann constant % sample rate (hz) fs = wlansamplerate(wlanhesuconfig('channelbandwidth',phyparameters.channelbandwidth)); rxnoisepower = 10*log10(k*t*fs) 30 phyparameters.noisefigure;
part a - align long-term radio characteristics
in this section, the simulation scenario, radio characteristics, and large-scale fading model are verified by performing the tgax evaluation methodology box 1 test 2 downlink only calibration test [ 3 ]. this test calculates the sinr at all receivers (stas) assuming all transmitters (aps) are active. multiple drops of transmitters and receivers are performed as part of the simulation. one active receiver is selected per drop.
the sinr for each receiver is calculated and aggregated over all drops simulated to generate a cdf curve. this curve is compared with the calibration results provided in [ 4 ].
a plot showing the node positions, active links, and interfering links is generated per drop. individual channels can be hidden and shown in the plot by clicking the corresponding legend entry.
seed = rng(6); % seed random number generator and store state if showscenarioplot hgrid = tgaxbuildresidentialgrid(scenarioparameters.roomsize,scenarioparameters.buildinglayout, ... numtx,numrx,macparameters.numchannels); end if calibrate fprintf('running calibration ...\n'); % pre-allocate output output = struct; output.sinr = zeros(simparameters.numdrops,numtx); % for storing sinr values for drop = 1:simparameters.numdrops % drop receivers in each room [association,txchannels,rxchannels,txpositions,rxpositions] = tgaxdropnodes( ... txs,rxs,scenarioparameters,macparameters.numchannels); % all transmitters active activetx = true(numtx,1); % only pick one receiver per room rxalloc = randi([1 scenarioparameters.numrxperroom],numtx,1); activerx = reshape(rxalloc==1:scenarioparameters.numrxperroom,[],1); % generate propagation model propmodel = tgaxresidential('roomsize',scenarioparameters.roomsize); % get the index of the transmitter for each receiver tnum = repmat((1:numtx),1,numrx/numtx); % sinr calculation - loop over each non-overlapping channel activechannels = unique(txchannels); for k = 1:numel(activechannels) % use kth non-overlapping channel tind = txchannels == activechannels(k); rind = false(size(activerx)); rind(activerx) = rxchannels(activerx) == activechannels(k); % get the index of the transmitter of interest for each active receiver tsigind = tnum(rind); % calculate snr output.sinr(drop,tind) = sinr(rxs(rind),txs(tind),... 'receivergain',phyparameters.rxgain,... 'receivernoisepower',rxnoisepower,... 'propagationmodel',propmodel,... 'signalsource',txs(tsigind)); end % plot nodes and links if showscenarioplot % update plot data mask = txchannels==rxchannels'; tgaxupdateplot(hgrid,txpositions,rxpositions,activetx,activerx,mask,txchannels,rxchannels, ... sprintf('box 1 test 2 "downlink only" calibration, drop #%d/%d',drop,simparameters.numdrops)); end end % plot the cdf of sinr and compare with calibration curves tgaxcalibrationcdf(output.sinr,'ss1box1test2','long-term radio characteristics'); fprintf('calibration complete \n') end
running calibration ... calibration complete
this example simulates a small number of drops. therefore, for a more meaningful comparison the number of drops simulated should be increased. the calibration result for 100 drops is shown below:
part b - phy-focused system-level simulation
in this section, the scenario and path-loss model calibrated in part a are used to perform a phy-focused system-level simulation and determine the packet error rate for the network. this simulation is described as phy-focused as the phy is not abstracted and the mac is simplified. each active link is modeled using baseband transmitter and receiver processing. a very simple mac assumes at each transmission event all transmitters (aps) wish to transmit, and one receiver (sta) per bss is the recipient. a simple cca algorithm is used to control channel access between transmitters as specified in figure 4 of [ 3 ]. the cca algorithm enables random transmitters if the signal power received from transmitters that have already been activated does not exceed the cca threshold, macparameters.ccathreshold
.
the received signal power from all possible interfering transmitters is calculated at each active receiver. if the received power from an interfering transmitter is above the noise floor of the receiver, then the link is modeled with full baseband transmitter and receiver processing. for each modeled link an he single-user packet is generated and passed through a tgax model-d nlos stationary indoor channel model. at the receiver, the waveforms from the transmitter of interest and all interfering transmitters are scaled by the expected path-loss and combined to create a waveform containing the signal of interest plus interference. all waveforms are time aligned. the receiver performs synchronization, demodulation, and decoding to attempt to recover the payload. the decoded payload is compared to the psdu transmitted in the bss to determine if the packet has been recovered successfully.
in this example the transmission and channel parameters are assumed to be the same for all nodes. the transmission configuration for all packets is one space-time stream, no space-time block coding and 16-qam rate-1/2 (mcs 3).
if systemlevelsimulation % pre-allocate outputs output.numpkts = zeros(numrx,1); output.numpkterrors = zeros(numrx,1); output.sinrmeas = nan(numrx,simparameters.numtxeventsperdrop,simparameters.numdrops); output.sinrest = nan(numrx,simparameters.numtxeventsperdrop,simparameters.numdrops); output.pkterrorrate = 0; % for each possible transmitter create a waveform configuration. in this % example the link and radio parameters are the same for all nodes. cfghebase = wlanhesuconfig; cfghebase.channelbandwidth = phyparameters.channelbandwidth; % channel bandwidth cfghebase.numtransmitantennas = phyparameters.numtxantennas; % number of transmit antennas cfghebase.spatialmapping = 'fourier'; % spatial mapping matrix cfghebase.numspacetimestreams = 1; % number of space-time streams cfghebase.guardinterval = 0.8; % guard interval duration cfghebase.heltftype = 4; % he-ltf compression mode cfghebase.apeplength = 1e3; % payload length in bytes cfghebase.channelcoding = 'ldpc'; % channel coding cfghebase.mcs = 3; % modulation and coding scheme cfghe = cell(numtx,1); for txidx = 1:numtx cfghe{txidx} = cfghebase; end fprintf('running system level simulation ...\n') for drop = 1:simparameters.numdrops fprintf(' running drop #%d/%d ...\n',drop,simparameters.numdrops); % drop receivers in each room [association,txchannels,rxchannels,txpositions,rxpositions] = tgaxdropnodes( ... txs,rxs,scenarioparameters,macparameters.numchannels); % generate propagation model propmodel = tgaxresidential('roomsize',scenarioparameters.roomsize); % calculate signal strength for all links signalstrength = sigstrength(rxs,txs,propmodel,'type','power',... 'receivergain',phyparameters.rxgain); % all signal strengths in dbm % threshold signals below noise level to reduce simulation time signalstrength(signalstrength < rxnoisepower) = -inf; % threshold signals that are not on same non-overlapping channel signalstrength(~(txchannels == rxchannels')) = -inf; % mask the transmitter-receiver links that are non-negligible to % simulate and get the linear indices nonnegligiblemask = signalstrength > -inf; % reset the non-negligible channels to create a new realization for the % current drop nonnegligibleidx = find(nonnegligiblemask)'; % for each possible active link in a drop create a channel % configuration. in this example the link and radio parameters are the % same for all nodes. tgaxchan = cell(numel(nonnegligibleidx),1); for i = 1:numel(nonnegligibleidx) % index of transmitter for a given link txidx = mod(nonnegligibleidx(i)-1,numtx) 1; % channel configuration. the channel realization for each link is % different as the global random stream is used. tgaxchanbase = wlantgaxchannel; tgaxchanbase.delayprofile = 'model-d'; tgaxchanbase.numtransmitantennas = cfghe{txidx}.numtransmitantennas; tgaxchanbase.numreceiveantennas = phyparameters.numrxantennas; tgaxchanbase.transmitreceivedistance = 10; % distance in meters for nlos tgaxchanbase.channelbandwidth = cfghe{txidx}.channelbandwidth; tgaxchanbase.largescalefadingeffect = 'none'; tgaxchanbase.environmentalspeed = 0; % m/s, stationary tgaxchanbase.samplerate = fs; tgaxchanbase.normalizechanneloutputs = false; % store in cell array and reset the channel to generate a new % response tgaxchan{i} = tgaxchanbase; reset(tgaxchan{i}); end for txevent = 1:simparameters.numtxeventsperdrop fprintf(' running transmission event #%d/%d ...\n',txevent,simparameters.numtxeventsperdrop); % determine active transmitters and receivers with clear channel assessment [activetx,activerx] = tgaxcca(signalstrength,macparameters.ccalevel); % plot scenario and links if showscenarioplot tgaxupdateplot(hgrid,txpositions,rxpositions,activetx,activerx,nonnegligiblemask,txchannels,rxchannels, ... sprintf('phy system-level simulation, drop #%d/%d, transmission event #%d/%d', ... drop,simparameters.numdrops,txevent,simparameters.numtxeventsperdrop)); end % extract elements for active links using activetx and activerx cfgheactive = cfghe(activetx); associationactive = association(activetx,activerx); nonnegligiblemaskactive = nonnegligiblemask(activetx,activerx); signalstrengthactive = signalstrength(activetx,activerx); % create array containing active channels tgaxchanactive = cell(size(associationactive)); matchidx = nonnegligibleidx==find(activetx&activerx'); tgaxchanactive(nonnegligiblemaskactive) = tgaxchan(any(matchidx,1)); % generate a waveform for each non-negligible active link and % combine waveforms for each receiver [rxwavs,txpsduactive,signalpower,interfpower] = tgaxgeneraterxwaveforms( ... cfgheactive,tgaxchanactive,nonnegligiblemaskactive,signalstrengthactive,associationactive); % run phy link simulation for each link and determine if the packet % has been decoded successfully. the estimated interference power % is passed to the receiver in the place of an interference power % measurement algorithm. numactiverxs = sum(activerx); pkterror = false(numactiverxs,1); sinrmeas = nan(numactiverxs,1); for rxidx = 1:numactiverxs [pkterror(rxidx),sinrmeas(rxidx)] = tgaxmodelphylink( ... rxwavs{rxidx},cfgheactive{rxidx},rxnoisepower,interfpower(rxidx),txpsduactive{rxidx}); end % store output for active receivers output.numpkterrors(activerx) = output.numpkterrors(activerx) pkterror; output.numpkts(activerx) = output.numpkts(activerx) 1; output.sinrmeas(activerx,txevent,drop) = sinrmeas; % calculate the expected sinr at each receiver sinrest = 10*log10(signalpower./(interfpower 10^((rxnoisepower-30)/10))); output.sinrest(activerx,txevent,drop) = sinrest; end end % calculate average packet error rate output.pkterrorrate = sum(output.numpkterrors)/sum(output.numpkts); disp('simulation complete') disp(['average packet error rate for transmitters: ' num2str(output.pkterrorrate)]); end rng(seed); % restore random state
running system level simulation ... running drop #1/3 ... running transmission event #1/2 ... running transmission event #2/2 ... running drop #2/3 ... running transmission event #1/2 ... running transmission event #2/2 ... running drop #3/3 ... running transmission event #1/2 ... running transmission event #2/2 ... simulation complete average packet error rate for transmitters: 0.054152
further exploration
the phy-focused system-level simulation demonstrated in this example can be used to explore the impact of phy-level parameters on system performance. for example, the plot below shows the network average packet error rate for different values of cca threshold for 50 drops and 2 transmission events per drop.
appendix
this example uses the following helper functions:
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.
ieee 802.11-14/0980r16 - tgax simulation scenarios.
ieee 802.11-14/0571r12 - 11ax evaluation methodology.
ieee 802.11-14/0800r30 - box 1 and box 2 calibration results.