Main Content

interpretEHTSIGCommonBits

Interpret EHT-SIG common field bits and update EHT MU transmission parameters

Since R2023b

Description

cfgUpdated = interpretEHTSIGCommonBits(cfg,bits,failCRC) updates extremely high-throughput (EHT) transmission parameters cfg by interpreting recovered EHT-SIG common field bits. The function sets the properties of cfg that are encoded in the EHT-SIG common field and returns updated transmission parameters cfgUpdated. If you use this syntax and the function cannot interpret the recovered EHT-SIG common field bits, the function does not return an output and issues an error message.

example

[cfgUpdated,failInterpretation] = interpretEHTSIGCommonBits(cfg,bits,failCRC) returns the result of EHT-SIG common field interpretation. If you use this syntax and the function cannot interpret the recovered EHT-SIG common field bits, the function returns the failInterpretation output as 1 and cfgUpdated as the cfg without updating any property values.

Examples

collapse all

Generate EHT SU Waveform

Create a single-user EHT configuration object with a channel bandwidth of 320 MHz.

chanBW = "CBW320";
cfgEHTSU = wlanEHTMUConfig(chanBW);

Create an EHT recovery object with the same channel bandwidth.

cfg = wlanEHTRecoveryConfig(ChannelBandwidth=chanBW);

Create a sequence of data bits. Use the bits to generate a time-domain waveform for the specified configuration. Pass the waveform through an AWGN channel with a signal-to-noise ratio of 10 dB. Return the PPDU field indices.

bits = randi([0 1],8*psduLength(cfgEHTSU),1);
tx = wlanWaveformGenerator(bits,cfgEHTSU);
rx = awgn(tx,10);
ind = wlanFieldIndices(cfg);

Recover L-SIG Bits

Demodulate the L-LTF and estimate the channel. Using the demodulated symbols, estimate the noise power.

lltf = rx(ind.LLTF(1):ind.LLTF(2),:);
lltfDemod = wlanEHTDemodulate(lltf,"L-LTF",cfg);
lltfChanEst = wlanLLTFChannelEstimate(lltfDemod,chanBW);
nVar = wlanLLTFNoiseEstimate(lltfDemod);

Decode the L-SIG field and obtain the OFDM information. The recovery configuration object requires this information to obtain the L-SIG length.

lsig = rx(ind.LSIG(1):ind.LSIG(2));
lsigDemod = wlanEHTDemodulate(lsig,"L-SIG",cfg);
info = wlanEHTOFDMInfo("L-SIG",cfg);
lsigDemodData = lsigDemod(info.DataIndices,:);

Estimate the channel at the L-SIG field and equalize the L-SIG symbols.

preEHTChanEst = wlanPreEHTChannelEstimate(lsigDemod,lltfChanEst,chanBW);
lsigEq = wlanEHTEqualize(lsigDemodData,preEHTChanEst(info.DataIndices,:),nVar,cfg,"L-SIG");

Recover the L-SIG bits and set the L-SIG length of the recovery object.

[lsigBits,failCheck,lsigInfo] = wlanLSIGBitRecover(lsigEq,0);
cfg.LSIGLength = lsigInfo.Length;

Update Recovery Configuration Object with U-SIG Bits

Demodulate the U-SIG field.

usig = rx(ind.USIG(1):ind.USIG(2),:);
usigDemod = wlanEHTDemodulate(usig,"U-SIG",cfg);

Get the OFDM information that corresponds to the U-SIG field. Use this information to isolate the data subcarriers.

preEHTInfo = wlanEHTOFDMInfo("U-SIG",cfg);
usigDataSym = usigDemod(preEHTInfo.DataIndices,:);

Equalize the U-SIG data symbols.

x = wlanEHTEqualize(usigDataSym,preEHTChanEst(preEHTInfo.DataIndices,:),nVar,cfg,"U-SIG");

Recover the U-SIG bits, ensuring that the bits pass the cyclic redundancy check (CRC).

[usigBits,failCRC] = wlanUSIGBitRecover(x,nVar);
disp(failCRC)
   0   0   0   0

Update the recovery configuration object with the U-SIG bits. Display the updated object. A property value of -1 or unknown indicates an unknown or undefined property, which you can update after decoding the EHT-SIG common and user fields of the EHT SU packet.

[cfg,failInterpretation] = interpretUSIGBits(cfg,usigBits,failCRC) % This syntax does not cause an error if interpretation fails
cfg = 
  wlanEHTRecoveryConfig with properties:

                ChannelBandwidth: 'CBW320'
                      LSIGLength: 39
                 CompressionMode: 1
                       EHTSIGMCS: 0
        NumEHTSIGSymbolsSignaled: 2
                 LDPCExtraSymbol: -1
             PreFECPaddingFactor: -1
                  PEDisambiguity: -1
                   GuardInterval: -1
                      EHTLTFType: -1
                NumEHTLTFSymbols: -1
                UplinkIndication: 0
                        BSSColor: 0
                    SpatialReuse: -1
                    TXOPDuration: -1
                NumNonOFDMAUsers: -1
       NumUsersPerContentChannel: -1
         RUTotalSpaceTimeStreams: -1
                          RUSize: -1
                         RUIndex: -1
      PuncturedChannelFieldValue: 0
                           STAID: -1
                             MCS: -1
                   ChannelCoding: unknown
                     Beamforming: -1
             NumSpaceTimeStreams: -1
    SpaceTimeStreamStartingIndex: -1
                  Channelization: 1

   Read-only properties:
                        PPDUType: su
                      EHTDUPMode: 0

failInterpretation = logical
   0

Update Recovery Configuration Object with EHT-SIG Common Field Bits

Update the field indices with the new information from the U-SIG bits.

ind = wlanFieldIndices(cfg);

Demodulate the EHT-SIG field. Get the corresponding OFDM information.

ehtSig = rx(ind.EHTSIG(1):ind.EHTSIG(2),:);
ehtsigDemod = wlanEHTDemodulate(ehtSig,"EHT-SIG",cfg);
preEHTInfo = wlanEHTOFDMInfo("EHT-SIG",cfg);

Equalize the EHT-SIG data symbols.

x = wlanEHTEqualize(ehtsigDemod(preEHTInfo.DataIndices,:),preEHTChanEst(preEHTInfo.DataIndices,:), ...
    nVar,cfg,"EHT-SIG");

Recover and interpret the EHT-SIG common field bits.

[ehtsigCommonBits,failCRC,cfg] = wlanEHTSIGCommonBitRecover(x,nVar,cfg); % This syntax causes an error if interpretation fails

Update Recovery Configuration Object with EHT-SIG User Field Bits

Recover and interpret the EHT-SIG user field bits. Display the updated recovery configuration object.

[ehtsigUserBits,failCRC] = wlanEHTSIGUserBitRecover(x,nVar,cfg);
cfg = interpretEHTSIGUserBits(cfg,ehtsigUserBits,failCRC); % This syntax causes an error if interpretation fails
cfg = cfg{1};
disp(cfg)
  wlanEHTRecoveryConfig with properties:

                ChannelBandwidth: 'CBW320'
                      LSIGLength: 39
                 CompressionMode: 1
                       EHTSIGMCS: 0
        NumEHTSIGSymbolsSignaled: 2
                 LDPCExtraSymbol: 1
             PreFECPaddingFactor: 3
                  PEDisambiguity: 0
                   GuardInterval: 3.2000
                      EHTLTFType: 4
                NumEHTLTFSymbols: 1
                UplinkIndication: 0
                        BSSColor: 0
                    SpatialReuse: 0
                    TXOPDuration: -1
                NumNonOFDMAUsers: 1
       NumUsersPerContentChannel: 1
         RUTotalSpaceTimeStreams: 1
                          RUSize: 3984
                         RUIndex: 1
      PuncturedChannelFieldValue: 0
                           STAID: 0
                             MCS: 0
                   ChannelCoding: ldpc
                     Beamforming: 0
             NumSpaceTimeStreams: 1
    SpaceTimeStreamStartingIndex: 1
                  Channelization: 1

   Read-only properties:
                        PPDUType: su
                      EHTDUPMode: 0

Recover EHT-Data Field

Update the field indices with the new information from the EHT-SIG bits.

ind = wlanFieldIndices(cfg);

Demodulate the EHT-Data field and recover the bits. Verify that the recovered bits match the transmitted bits.

ehtData = rx(ind.EHTData(1):ind.EHTData(2),:);
ehtdataDemod = wlanEHTDemodulate(ehtData,"EHT-Data",cfg);
infoData = wlanEHTOFDMInfo("EHT-Data",cfg);
rxDataSym = ehtdataDemod(infoData.DataIndices,:,:);
dataBits = wlanEHTDataBitRecover(rxDataSym,nVar,cfg);
isequal(bits,dataBits)
ans = logical
   1

Input Arguments

collapse all

EHT transmission parameters before interpretation of the EHT-SIG common field bits, specified as a wlanEHTRecoveryConfig object.

Recovered EHT-SIG common field bits, specified as a binary-valued matrix. The properties of this input depend on whether the transmission is non-OFDMA or OFDMA.

  • For non-OFDMA transmissions, the EHT-SIG common bit fields are defined in Table 36-36 of [1] for EHT SU and MU-MIMO, and Table 36-37 for NDP. The size of the matrix depends on the PPDU type.

    PPDU TypeSize of bits
    EHT SU20-by-1
    Sounding null data packet (NDP) 16-by-1
    MU-MIMO20-by-C
    C is the number of content channels in the transmission. It is equal to 1 for a 20 MHz channel and equal to 2 for all other bandwidths.

  • For OFDMA transmissions, the EHT-SIG common field bits are defined in Table 36-33 of [1]. The size of the matrix depends on the channel bandwidth.

    Channel BandwidthSize of bits
    20 MHz and 40 MHz36-by-C
    80 MHz45-by-C
    160 MHz73-by-C-by-L
    320 MHz109-by-C-by-L
    • C is the number of content channels in the transmission. It is equal to 1 for a 20 MHz channel and equal to 2 for all other bandwidths.

    • L is the number of 80 MHz subblocks. It is equal to 4 for a 320 MHz channel, 2 for 160 MHz, and 1 for all other bandwidths.

Data Types: double | int8

Cyclic redundancy check (CRC) result for the EHT-SIG field, specified as a logical array. The size of the array is X-by-C-by-L, where:

  • X is the number of EHT-SIG common encoding blocks. It is equal to 1 for non-OFDMA transmissions. For OFDMA transmissions, it is equal to 2 for 160 MHz and 320 MHz and 1 for all other bandwidths. For more information, see Figures 36-31, 36-32, and 36-33 of [1].

  • C is the number of content channels in the transmission. It is equal to 1 for a 20 MHz channel and equal to 2 for all other bandwidths.

  • L is the number of 80 MHz subblocks. It is equal to 4 for a 320 MHz channel, 2 for 160 MHz, and 1 for all other bandwidths.

A value of 1 or true indicates a CRC failure.

Data Types: logical

Output Arguments

collapse all

Updated EHT transmission parameters, returned as a wlanEHTRecoveryConfig object. The function updates the properties of this object in accordance with the recovered EHT-SIG common field bits.

For a non-OFDMA EHT multi-user (MU) packet, the function updates different properties of the recovery object depending on the PPDU type. If the PPDU type is EHT SU or MU-MIMO, the function updates these properties:

If the PPDU type is sounding NDP, the function updates these properties:

If the PPDU type is OFDMA, the function updates these properties:

Result of EHT-SIG common field interpretation, returned as a logical 0 or 1. A value of 1 indicates that the function cannot interpret the recovered EHT-SIG common field bits. A value of 0 indicates that the function has successfully interpreted the EHT-SIG common field bits.

Data Types: logical

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Version History

Introduced in R2023b

expand all