main content

recovery procedure for an 802.11ax packet -凯发k8网页登录

this example shows how to detect a packet and decode payload bits in a received ieee® 802.11ax™ waveform. the receiver recovers the packet format parameters from the preamble fields to decode the data field and the mac frame.

introduction

in an 802.11ax packet the transmission parameters are signaled to the receiver using the l-sig, he-sig-a, and he-sig-b preamble fields [ 1 ]:

  • the l-sig field contains information to allow the receiver to determine the transmission time of the packet.

  • the he-sig-a field contains common transmission parameters for he-mu users and all transmission parameters for he-su and he-ext-su packets.

  • the combination of length information in the l-sig field, the modulation type, and the number of ofdm symbols in the he-sig-a field determines the he packet format.

  • the he-sig-b field contains resource unit (ru) allocation information and the transmission parameters for the users in an he-mu packet.

in this example we detect and decode an he-mu packet within a generated waveform. this example can also recover he-su and he-ext-su packets. all transmission parameters apart from the channel bandwidth are assumed to be unknown and are therefore retrieved from the decoded l-sig, he-sig-a, and he-sig-b preamble fields. the recovered transmission parameters are used to decode the he-data field. additionally, the following analysis is performed:

  • the waveform of the detected packet is recovered and displayed.

  • the spectrum of the detected packet is recovered and displayed.

  • the constellation of the equalized data symbols for all spatial streams is displayed.

  • the error vector magnitude (evm) of each field is measured.

  • an a-mpdu is detected and frame check sequence (fcs) is determined for the recovered mac frame.

  • the evm per data symbol and spatial stream averaged over subcarriers is displayed.

  • the evm per data subcarrier and spatial stream averaged over symbols is displayed.

waveform transmission

in this example an 802.11ax he-mu waveform is synthesized but you can use a captured waveform. you can use matlab® to acquire i/q data from a wide range of instruments with the instrument control toolbox™ and software defined radio platforms.

the synthesized waveform is impaired by a 2x2 tgax indoor fading channel, additive white gaussian noise, and carrier frequency offset. to generate an he-mu waveform we configure an he-mu format configuration object . note that the configuration object is used at the transmitter side only. the receiver will formulate an he recovery configuration object . the unknown properties of the he recovery configuration object are set after decoding the information bits in the l-sig, he-sig-a, and he-sig-b fields. the helper function generates the impaired waveform. the following processing steps are performed:

  • a random payload of msdus is created for the mac frame, which is encoded into an he-mu packet.

  • the waveform is passed through a tgax indoor fading channel model.

  • carrier frequency offset (cfo) and additive white gaussian noise (awgn) are added to the waveform.

% a mixed ofdma and mu-mimo configuration is defined for an he-mu packet.
% the allocation index 17 defines two 52-tone rus, with one user in each
% ru, and one 106-tone ru. the 106-tone ru has two users in a mu-mimo
% configuration.
cfgmu = wlanhemuconfig(17);
cfgmu.numtransmitantennas = 2;
% configure ru 1 and user 1
cfgmu.ru{1}.spatialmapping = 'direct';
cfgmu.user{1}.staid = 1;
cfgmu.user{1}.apeplength = 1e3;
cfgmu.user{1}.mcs = 5;
cfgmu.user{1}.numspacetimestreams = 2;
cfgmu.user{1}.channelcoding = 'ldpc';
% configure ru 2 and user 2
cfgmu.ru{2}.spatialmapping = 'fourier';
cfgmu.user{2}.staid = 2;
cfgmu.user{2}.apeplength = 500;
cfgmu.user{2}.mcs = 4;
cfgmu.user{2}.numspacetimestreams = 1;
cfgmu.user{2}.channelcoding = 'bcc';
% configure ru 3 and user 1
cfgmu.ru{3}.spatialmapping = 'fourier';
cfgmu.user{3}.staid = 3;
cfgmu.user{3}.apeplength = 100;
cfgmu.user{3}.mcs = 2;
cfgmu.user{3}.numspacetimestreams = 1;
cfgmu.user{3}.channelcoding = 'bcc';
% configure ru 3 and user 2
cfgmu.user{4}.staid = 4;
cfgmu.user{4}.apeplength = 500;
cfgmu.user{4}.mcs = 3;
cfgmu.user{4}.numspacetimestreams = 1;
cfgmu.user{4}.channelcoding = 'ldpc';
% specify propagation channel
numrx = 2; % number of receive antennas
delayprofile = 'model-d'; % tgax channel delay profile
% specify impairments
noisepower = -40; % noise power to apply in dbw
cfo = 62e3; % carrier frequency offset hz
% generate waveform
rx = hesigrecgeneratewaveform(cfgmu,numrx,delayprofile,noisepower,cfo);

packet recovery

the signal to process is stored in the variable rx. the processing steps to recover a packet are:

  • an he recovery configuration object, is created. the object properties are updated as preamble fields are decoded.

  • the packet is detected and synchronized.

  • the l-ltf is extracted and demodulated. the demodulated l-ltf symbols do not include tone rotation for each 20 mhz segment as described in [ 2 ], section 21.3.7.5.

  • the demodulated l-ltf symbols are used for channel and noise estimates.

  • the time-domain signal containing samples equivalent to four ofdm symbols immediately following the l-ltf are used to determine the he packet format. the packet format is updated in the object.

  • the l-ltf is demodulated. the demodulated l-ltf symbols include tone rotation for each 20 mhz segment as described in [ 2 ], section 21.3.7.5. the l-ltf channel estimates (with tone rotation) are used to decode the pre-he-ltf.

  • the l-sig and rl-sig fields are extracted. the channel is estimated on an extra four subcarriers per subchannel in the l-sig and rl-sig fields. the l-ltf channel estimates are updated to include the channel estimates on the extra subcarriers.

  • the information bits in the l-sig field are recovered to determine the length of the packet in microseconds.

  • after he-sig-a decoding, the recovery configuration object is updated with common transmission parameters for an he-mu packet and all transmission parameters for he-su and he-ext-su packets.

  • for an he-mu packet format the he-sig-b field is decoded. for a non-compressed sigb waveform the he-sig-b common field is decoded first followed by he-sig-b user field. for a compressed sigb waveform only the he-sig-b user field is decoded.

  • for an he-mu format without sigb compression the ru allocation and user transmission parameters are recovered from the he-sig-b field. for a compressed sigb waveform the ru allocation information is inferred from he-sig-a field and the user transmission parameters are determined from the he-sig-b user field bits.

  • the object is created using the recovered transmission parameters for each user after he-sig-b decoding.

  • the he-ltf field is extracted and demodulated. the demodulated symbols are used for channel estimation of the subcarriers allocated to the user of interest. the mimo channel estimates are used to decode the he-data field.

  • the he-data field is extracted and the psdu bits are recovered using the object for each user.

  • detect a-mpdu within the recovered psdu and check the fcs for the recovered mac frame.

setup waveform recovery parameters

in this example all transmission parameters apart from the channel bandwidth are assumed to be unknown and will be recovered. a recovery configuration object, , is created to store the recovered information in the l-sig, he-sig-a, and he-sig-b preamble fields. the transmission properties in are updated after subsequent decoding of the preamble fields. the following code configures objects and variables for processing.

chanbw = cfgmu.channelbandwidth; % assume channel bandwidth is known
sr = wlansamplerate(cfgmu); % sample rate
% specify pilot tracking method for recovering the data field. this can be:
%  'joint' - use joint common phase error and sample rate offset tracking
%  'cpe' - use only common phase error tracking
% when recovering 26-tone rus only cpe tracking is used as the joint
% tracking algorithm is susceptible to noise.
pilottracking = 'joint';
% create an he recovery configuration object and set the channel bandwidth
cfgrx = wlanherecoveryconfig;
cfgrx.channelbandwidth = chanbw;
% the recovery configuration object is used to get the start and end
% indices of the pre-he-sig-b field.
ind = wlanfieldindices(cfgrx);
% setup plots for the example
[spectrumanalyzer,timescope,constellationdiagram,evmpersubcarrier,evmpersymbol] = hesigrecsetupplots(sr);
% minimum packet length is 10 ofdm symbols
lstflength = double(ind.lstf(2));
minpktlen = lstflength*5; % number of samples in l-stf
rxwavelen = size(rx,1);

front-end processing

the front-end processing consists of packet detection, coarse carrier frequency offset correction, timing synchronization, and fine carrier frequency offset correction. a loop is used to detect and synchronize a packet within the received waveform. the sample offset searchoffset is used to index into rx to detect a packet. the first packet within rx is detected and processed. if the synchronization fails for the detected packet, the sample index offset searchoffset is incremented to move beyond the processed packet in rx. this is repeated until a packet has been successfully detected and synchronized.

searchoffset = 0; % offset from start of waveform in samples
while (searchoffset   minpktlen) <= rxwavelen
    % packet detection
    pktoffset = wlanpacketdetect(rx,chanbw,searchoffset);
    % adjust packet offset
    pktoffset = searchoffset   pktoffset;
    if isempty(pktoffset) || (pktoffset   ind.lsig(2) > rxwavelen)
        error('** no packet detected **');
    end
    % coarse frequency offset estimation and correction using l-stf
    rxlstf = rx(pktoffset (ind.lstf(1):ind.lstf(2)), :);
    coarsefreqoffset = wlancoarsecfoestimate(rxlstf,chanbw);
    rx = frequencyoffset(rx,sr,-coarsefreqoffset);
    % symbol timing synchronization
    searchbufferlltf = rx(pktoffset (ind.lstf(1):ind.lsig(2)),:);
    pktoffset = pktoffset wlansymboltimingestimate(searchbufferlltf,chanbw);
    % fine frequency offset estimation and correction using l-stf
    rxlltf = rx(pktoffset (ind.lltf(1):ind.lltf(2)),:);
    finefreqoffset = wlanfinecfoestimate(rxlltf,chanbw);
    rx = frequencyoffset(rx,sr,-finefreqoffset);
    % timing synchronization complete: packet detected
    fprintf('packet detected at index %d\n',pktoffset   1);
    % display estimated carrier frequency offset
    cfocorrection = coarsefreqoffset   finefreqoffset; % total cfo
    fprintf('estimated cfo: %5.1f hz\n\n',cfocorrection);
    break; % front-end processing complete, stop searching for a packet
end
% scale the waveform based on l-stf power (agc)
gain = 1./(sqrt(mean(rxlstf.*conj(rxlstf))));
rx = rx.*gain;
packet detected at index 404
estimated cfo: 61942.9 hz

packet format detection

the time-domain samples equivalent to four ofdm symbols immediately following the l-ltf are used to determine the he packet format [ 1 figure. 27-63]. the l-ltf is extracted and demodulated. for format detection, the demodulated l-ltf symbols must not include tone rotation for each 20 mhz segment as described in [ 2 ], section 21.3.7.5. the demodulated l-ltf is used for channel and noise estimation. the l-ltf channel (without tone rotation) and noise power estimates are used to detect the packet format.

rxlltf = rx(pktoffset (ind.lltf(1):ind.lltf(2)),:);
lltfdemod = wlanlltfdemodulate(rxlltf,chanbw);
lltfchanest = wlanlltfchannelestimate(lltfdemod,chanbw);
noisevar = wlanlltfnoiseestimate(lltfdemod);
disp('detect packet format...');
rxsiga = rx(pktoffset (ind.lsig(1):ind.hesiga(2)),:);
pktformat = wlanformatdetect(rxsiga,lltfchanest,noisevar,chanbw);
fprintf('  %s packet detected\n\n',pktformat);
% set the packet format in the recovery object and update the field indices
cfgrx.packetformat = pktformat;
ind = wlanfieldindices(cfgrx);
detect packet format...
  he-mu packet detected

l-ltf channel estimate

demodulate the l-ltf and perform channel estimation. the demodulated l-ltf symbols include tone rotation for each 20 mhz segment as described in [ 2 ], section 21.3.7.5. the l-ltf channel estimates (with tone rotation) are used to equalize and decode the pre-he-ltf fields.

lltfdemod = wlanhedemodulate(rxlltf,'l-ltf',chanbw);
lltfchanest = wlanlltfchannelestimate(lltfdemod,chanbw);

l-sig and rl-sig decoding

the l-sig field is used to determine the receive time, or rxtime, of the packet. the rxtime is calculated using the length bits of the l-sig payload. the l-sig and rl-sig fields are recovered to perform the channel estimate on the extra subcarriers in the l-sig and rl-sig fields. the lltfchanest channel estimates are updated to include the channel estimates on extra subcarriers in the l-sig and rl-sig fields. the l-sig payload is decoded using an estimate of the channel and noise power obtained from the l-ltf field. the l-sig length property in is updated after l-sig decoding.

disp('decoding l-sig... ');
% extract l-sig and rl-sig fields
rxlsig = rx(pktoffset (ind.lsig(1):ind.rlsig(2)),:);
% ofdm demodulate
helsigdemod = wlanhedemodulate(rxlsig,'l-sig',chanbw);
% estimate cpe and phase correct symbols
helsigdemod = wlanhetrackpiloterror(helsigdemod,lltfchanest,cfgrx,'l-sig');
% estimate channel on extra 4 subcarriers per subchannel and create full
% channel estimate
preheinfo = wlanheofdminfo('l-sig',chanbw);
prehechanest = wlanprehechannelestimate(helsigdemod,lltfchanest,chanbw);
% average l-sig and rl-sig before equalization
helsigdemod = mean(helsigdemod,2);
% equalize data carrying subcarriers, merging 20 mhz subchannels
[eqlsigsym,csi] = prehesymbolequalize(helsigdemod(preheinfo.dataindices,:,:), ...
    prehechanest(preheinfo.dataindices,:,:),noisevar,preheinfo.numsubchannels);
% decode l-sig field
[~,failcheck,lsiginfo] = wlanlsigbitrecover(eqlsigsym,noisevar,csi);
if failcheck
    disp(' ** l-sig check fail **');
else
    disp(' l-sig check pass');
end
% get the length information from the recovered l-sig bits and update the
% l-sig length property of the recovery configuration object
lsiglength = lsiginfo.length;
cfgrx.lsiglength = lsiglength;
% measure evm of l-sig symbols
evm = comm.evm;
evm.referencesignalsource = 'estimated from reference constellation';
evm.normalization = 'average constellation power';
evm.referenceconstellation = wlanreferencesymbols('bpsk');
rmsevm = evm(eqlsigsym);
fprintf(' l-sig evm: %2.2fdb\n\n',20*log10(rmsevm/100));
% calculate the receive time and corresponding number of samples in the
% packet
rxtime = ceil((lsiglength   3)/3) * 4   20; % in microseconds
numrxsamples = round(rxtime * 1e-6 * sr);   % number of samples in time
fprintf(' rxtime: %dus\n',rxtime);
fprintf(' number of samples in the packet: %d\n\n',numrxsamples);
decoding l-sig... 
 l-sig check pass
 l-sig evm: -36.91db
 rxtime: 536us
 number of samples in the packet: 10720

the waveform and spectrum of the detected packet within rx is displayed given the calculated rxtime and corresponding number of samples.

sampleoffset = max((-lstflength   pktoffset),1); % first index to plot
samplespan = numrxsamples   2*lstflength; % number samples to plot
% plot as much of the packet (and extra samples) as we can
plotidx = sampleoffset:min(sampleoffset   samplespan,rxwavelen);
% configure timescope to display the packet
timescope.timespan = samplespan/sr;
timescope.timedisplayoffset = sampleoffset/sr;
timescope.ylimits = [0 max(abs(rx(:)))];
timescope(abs(rx(plotidx,:)));
release(timescope);
% display the spectrum of the detected packet
spectrumanalyzer(rx(pktoffset   (1:numrxsamples),:));
release(spectrumanalyzer);

he-sig-a decoding

the he-sig-a field contains the transmission configuration of an he packet. an estimate of the channel and noise power obtained from the l-ltf is required to decode the he-sig-a field.

disp('decoding he-sig-a...')
rxsiga = rx(pktoffset (ind.hesiga(1):ind.hesiga(2)),:);
sigademod = wlanhedemodulate(rxsiga,'he-sig-a',chanbw);
hesigademod = wlanhetrackpiloterror(sigademod,prehechanest,cfgrx,'he-sig-a');
% equalize data carrying subcarriers, merging 20 mhz subchannels
preheinfo = wlanheofdminfo('he-sig-a',chanbw);
[eqsigasym,csi] = prehesymbolequalize(hesigademod(preheinfo.dataindices,:,:), ...
                                      prehechanest(preheinfo.dataindices,:,:), ...
                                      noisevar,preheinfo.numsubchannels);
% recover he-sig-a bits
[sigabits,failcrc] = wlanhesigabitrecover(eqsigasym,noisevar,csi);
% perform the crc on he-sig-a bits
if failcrc
    disp(' ** he-sig-a crc fail **');
else
    disp(' he-sig-a crc pass');
end
% measure evm of he-sig-a symbols
release(evm);
if strcmp(pktformat,'he-ext-su')
    % the second symbol of an he-sig-a field for an he-ext-su packet is
    % qbpsk.
    evm.referenceconstellation = wlanreferencesymbols('bpsk',[0 pi/2 0 0]);
    % account for scaling of l-ltf for an he-ext-su packet
    rmsevm = evm(eqsigasym*sqrt(2));
else
    evm.referenceconstellation = wlanreferencesymbols('bpsk');
    rmsevm = evm(eqsigasym);
end
fprintf(' he-sig-a evm: %2.2fdb\n\n',20*log10(mean(rmsevm)/100));
decoding he-sig-a...
 he-sig-a crc pass
 he-sig-a evm: -35.17db

interpret recovered he-sig-a bits

the object is updated after interpreting the recovered he-sig-a bits.

cfgrx = interprethesigabits(cfgrx,sigabits);
ind = wlanfieldindices(cfgrx); % update field indices

display the common transmission configuration obtained from he-sig-a field for an he-mu packet. the properties indicated by -1 are unknown or undefined. the unknown user-related properties are updated after successful decoding of the he-sig-b field.

disp(cfgrx)
  wlanherecoveryconfig with properties:
                    packetformat: 'he-mu'
                channelbandwidth: 'cbw20'
                      lsiglength: 383
                 sigbcompression: 0
                         sigbmcs: 0
                         sigbdcm: 0
          numsigbsymbolssignaled: 5
                            stbc: 0
                 ldpcextrasymbol: 0
             prefecpaddingfactor: 4
                  pedisambiguity: 0
                   guardinterval: 3.2000
                       heltftype: 4
                 numheltfsymbols: 2
                uplinkindication: 0
                        bsscolor: 0
                    spatialreuse: 0
                    txopduration: 127
                     highdoppler: 0
                 allocationindex: -1
       numuserspercontentchannel: -1
         rutotalspacetimestreams: -1
                          rusize: -1
                         ruindex: -1
                           staid: -1
                             mcs: -1
                             dcm: -1
                   channelcoding: 'unknown'
                     beamforming: -1
             numspacetimestreams: -1
    spacetimestreamstartingindex: -1

he-sig-b decoding

for an he-mu packet the he-sig-b field contains:

  • the ru allocation information for a non-compressed sigb waveform is inferred from he-sig-b common field [ 1 table. 27-24]. for a compressed sigb waveform the ru allocation information is inferred from the recovered he-sig-a bits.

  • for a non-compressed sigb waveform the number of he-sig-b symbols are updated in the object. the symbols are only updated if the number of he-sig-b symbols indicated in the he-sig-a field is set to 15 and all content channels pass the crc. the number of he-sig-b symbols indicated in the he-sig-a field are not updated if any he-sig-b content channel fails the crc.

  • the user transmission parameters for both sigb compressed and non-compressed waveforms are inferred from the he-sig-b user field [ 1 table. 27-27, 27-28].

an estimate of the channel and noise power obtained from the l-ltf is required to decode the he-sig-b field.

if strcmp(pktformat,'he-mu')
    fprintf('decoding he-sig-b...\n');
    if ~cfgrx.sigbcompression
        fprintf(' decoding he-sig-b common field...\n');
        s = getsigblength(cfgrx);
        % get common field symbols. the start of he-sig-b field is known
        rxsym = rx(pktoffset (double(ind.hesiga(2)) (1:s.numsigbcommonfieldsamples)),:);
        % decode he-sig-b common field
        [status,cfgrx] = hesigbcommonfielddecode(rxsym,prehechanest,noisevar,cfgrx);
        % crc on he-sig-b content channels
        if strcmp(status,'success')
            fprintf('  he-sig-b (common field) crc pass\n');
        elseif strcmp(status,'contentchannel1crcfail')
            fprintf('  ** he-sig-b crc fail for content channel-1\n **');
        elseif strcmp(status,'contentchannel2crcfail')
            fprintf('  ** he-sig-b crc fail for content channel-2\n **');
        elseif any(strcmp(status,{'unknownnumuserscontentchannel1','unknownnumuserscontentchannel2'}))
            error('  ** unknown packet length, discard packet\n **');
        else
            % discard the packet if all he-sig-b content channels fail
            error('  ** he-sig-b crc fail **');
        end
        % update field indices as the number of he-sig-b symbols are
        % updated
        ind = wlanfieldindices(cfgrx);
    end
    % get complete he-sig-b field samples
    rxsigb = rx(pktoffset (ind.hesigb(1):ind.hesigb(2)),:);
    fprintf(' decoding he-sig-b user field... \n');
    % decode he-sig-b user field
    [failcrc,cfgusers] = hesigbuserfielddecode(rxsigb,prehechanest,noisevar,cfgrx);
    % crc on he-sig-b users
    if ~all(failcrc)
        fprintf('  he-sig-b (user field) crc pass\n\n');
        numusers = numel(cfgusers);
    elseif all(failcrc)
        % discard the packet if all users fail the crc
        error('  ** he-sig-b crc fail for all users **');
    else
        fprintf('  ** he-sig-b crc fail for at least one user\n **');
        % only process users with valid crc
        numusers = numel(cfgusers);
    end
else % he-su, he-ext-su
    cfgusers = {cfgrx};
    numusers = 1;
end
decoding he-sig-b...
 decoding he-sig-b common field...
  he-sig-b (common field) crc pass
 decoding he-sig-b user field... 
  he-sig-b (user field) crc pass

he-data decoding

the updated object for each user can then be used to recover the psdu bits for each user in the he-data field.

cfgdatarec = trackingrecoveryconfig;
cfgdatarec.pilottracking = pilottracking;
fprintf('decoding he-data...\n');
for iu = 1:numusers
    % get recovery configuration object for each user
    user = cfgusers{iu};
    if strcmp(pktformat,'he-mu')
        fprintf(' decoding user:%d, staid:%d, rusize:%d\n',iu,user.staid,user.rusize);
    else
        fprintf(' decoding rusize:%d\n',user.rusize);
    end
    heinfo = wlanheofdminfo('he-data',chanbw,user.guardinterval,[user.rusize user.ruindex]);
    % he-ltf demodulation and channel estimation
    rxheltf = rx(pktoffset (ind.heltf(1):ind.heltf(2)),:);
    heltfdemod = wlanhedemodulate(rxheltf,'he-ltf',chanbw,user.guardinterval, ...
        user.heltftype,[user.rusize user.ruindex]);
    [chanest,pilotest] = wlanheltfchannelestimate(heltfdemod,user);
    % number of expected data ofdm symbols
    symlen = heinfo.fftlength heinfo.cplength;
    numofdmsym = double((ind.hedata(2)-ind.hedata(1) 1))/symlen;
    % he-data demodulation with pilot phase and timing tracking
    % account for extra samples when extracting data field from the packet
    % for sample rate offset tracking. extra samples may be required if the
    % receiver clock is significantly faster than the transmitter.
    maxsro = 120; % parts per million
    ne = ceil(numrxsamples*maxsro*1e-6); % number of extra samples
    ne = min(ne,rxwavelen-numrxsamples); % limited to length of waveform
    numrxsamplesprocess = numrxsamples ne;
    rxdata = rx(pktoffset (ind.hedata(1):numrxsamplesprocess),:);
    if user.rusize==26
        % force cpe only tracking for 26-tone ru as algorithm susceptible
        % to noise
        cfgdatarec.pilottracking = 'cpe';
    else
        cfgdatarec.pilottracking = pilottracking;
    end
    [demodsym,cpe,peg] = hetrackingofdmdemodulate(rxdata,chanest,numofdmsym,user,cfgdatarec);
    % estimate noise power in he fields
    demodpilotsym = demodsym(heinfo.pilotindices,:,:);
    nvarest = henoiseestimate(demodpilotsym,pilotest,user);
    % equalize
    [eqsym,csi] = heequalizecombine(demodsym,chanest,nvarest,user);
    % discard pilot subcarriers
    eqsymuser = eqsym(heinfo.dataindices,:,:);
    csidata = csi(heinfo.dataindices,:);
    % demap and decode bits
    rxpsdu = wlanhedatabitrecover(eqsymuser,nvarest,csidata,user,'ldpcdecodingmethod','norm-min-sum');
    % deaggregate the a-mpdu
    [mpdulist,~,status] = wlanampdudeaggregate(rxpsdu,wlanhesuconfig);
    if strcmp(status,'success')
        fprintf('  a-mpdu deaggregation successful \n');
    else
        fprintf('  a-mpdu deaggregation unsuccessful \n');
    end
    % decode the list of mpdus and check the fcs for each mpdu
    for i = 1:numel(mpdulist)
        [~,~,status] = wlanmpdudecode(mpdulist{i},wlanhesuconfig,'dataformat','octets');
        if strcmp(status,'success')
            fprintf('  fcs pass for mpdu:%d\n',i);
        else
            fprintf('  fcs fail for mpdu:%d\n',i);
        end
    end
    % plot equalized constellation of the recovered he data symbols for all
    % spatial streams per user
    heploteqconstellation(eqsymuser,user,constellationdiagram,iu,numusers);
    % measure evm of he-data symbols
    release(evm);
    evm.referenceconstellation = wlanreferencesymbols(user);
    rmsevm = evm(eqsymuser(:));
    fprintf('  he-data evm:%2.2fdb\n\n',20*log10(rmsevm/100));
    % plot evm per symbol of the recovered he data symbols
    heplotevmpersymbol(eqsymuser,user,evmpersymbol,iu,numusers);
    % plot evm per subcarrier of the recovered he data symbols
    heplotevmpersubcarrier(eqsymuser,user,evmpersubcarrier,iu,numusers);
end
decoding he-data...
 decoding user:1, staid:1, rusize:52
  a-mpdu deaggregation successful 
  fcs pass for mpdu:1
  he-data evm:-28.61db
 decoding user:2, staid:2, rusize:52
  a-mpdu deaggregation successful 
  fcs pass for mpdu:1
  he-data evm:-39.94db
 decoding user:3, staid:3, rusize:106
  a-mpdu deaggregation successful 
  fcs pass for mpdu:1
  he-data evm:-28.22db
 decoding user:4, staid:4, rusize:106
  a-mpdu deaggregation successful 
  fcs pass for mpdu:1
  he-data evm:-31.44db

selected bibliography

  1. 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.

  2. ieee std 802.11™-2020 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.

网站地图