Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

wlanFormatDetect

Packet format detection

Syntax

format = wlanFormatDetect(rxSig,chEst,noiseVarEst,cbw)
format = wlanFormatDetect(rxSig,chEst,noiseVarEst,cbw,cfgRec)

Description

example

format = wlanFormatDetect(rxSig,chEst,noiseVarEst,cbw) detects and returns the packet format for the specified received signal. Inputs include the received signal, the channel estimate, the noise variance estimate, and the channel bandwidth. For more information, see Format Detection Processing.

example

format = wlanFormatDetect(rxSig,chEst,noiseVarEst,cbw,cfgRec) uses cfgRec to specify algorithm options for information bit recovery.

Examples

collapse all

Perform format detection on a WLAN high throughput mixed format (HT-MF) waveform.

Generate an HT-MF waveform and add noise to the transmitted waveform.

cbw = 'CBW20';
cfgTx = wlanHTConfig('ChannelBandwidth',cbw);
tx = wlanWaveformGenerator([1;0;0;1],cfgTx);
snr = 10;
rxSig = awgn(tx,snr);

Demodulate Received Signal and Perform Channel Estimation

  • Determine indices for the L-LTF for the 20 MHz bandwidth waveform. For this calculation, define local variables for the sample rate and duration of the L-STF and L-LTF fields in seconds.

  • Demodulate the L-LTF.

  • Perform channel estimation using the L-LTF.

  • Estimate the noise variance.

sr = 20e6;
Tlstf = 8e-6;
Tlltf = 8e-6;

idxlltf = Tlstf*sr+(1:Tlltf*sr);

lltfDemod = wlanLLTFDemodulate(rxSig(idxlltf,:),cbw);
chEst = wlanLLTFChannelEstimate(lltfDemod,cbw);
noiseVarEst = 10^(-snr/20);

Detect Signal Format

  • Determine indices for the three symbols following the L-LTF. For a 20 MHz bandwidth waveform, the duration for three symbols is 12 .

  • Perform format detection.

idxDetectionSymbols = (Tlstf+Tlltf)*sr+(1:12e-6*sr);

in = rxSig(idxDetectionSymbols,:);
format = wlanFormatDetect(in,chEst,noiseVarEst,cbw)
format =

    'HT-MF'

Perform format detection on a WLAN very high throughput (VHT) waveform. Use the recovery configuration object to adjust the default recovery algorithm settings.

Generate an VHT waveform and add noise to the transmitted waveform.

cbw = 'CBW80';
cfgTx = wlanVHTConfig('ChannelBandwidth',cbw);
tx = wlanWaveformGenerator([1;0;0;1],cfgTx);
snr = 10;
rxSig = awgn(tx,snr);

Received signal demodulation and channel estimation

  • Determine indices for the L-LTF for the 80 MHz bandwidth waveform. For this calculation, define local variables for the sample rate and duration of the L-STF and L-LTF fields in seconds.

  • Demodulate the L-LTF.

  • Perform channel estimation using the L-LTF.

  • Estimate the noise variance.

sr = 80e6;
Tlstf = 8e-6;
Tlltf = 8e-6;

idxlltf = Tlstf*sr+(1:Tlltf*sr);

lltfDemod = wlanLLTFDemodulate(rxSig(idxlltf,:),cbw);
chEst = wlanLLTFChannelEstimate(lltfDemod,cbw);
noiseVarEst = 10^(-snr/20);

Format detection

  • Determine indices for the three symbols following the L-LTF. For an 80 MHz bandwidth waveform, the duration for three symbols is 12 .

  • Adjust the default recovery settings.

  • Perform format detection using modified recovery settings.

TdetectionSymbols = 12e-6;
idxDetectionSymbols = (Tlstf+Tlltf)*sr+(1:TdetectionSymbols*sr);
in = rxSig(idxDetectionSymbols,:);
cfgRec = wlanRecoveryConfig('OFDMSymbolOffset',0.5,...
    'PilotPhaseTracking','None')
format = wlanFormatDetect(in,chEst,noiseVarEst,cbw,cfgRec)
cfgRec = 

  wlanRecoveryConfig with properties:

             OFDMSymbolOffset: 0.5000
           EqualizationMethod: 'MMSE'
           PilotPhaseTracking: 'None'
    MaximumLDPCIterationCount: 12
             EarlyTermination: 0


format =

    'VHT'

Input Arguments

collapse all

Received time-domain signal containing the three OFDM symbols immediately following the L-LTF, specified as an NS-by-NR matrix. NS represents the number of time-domain samples in three OFDM symbols. NR is the number of receive antennas.

Note

If NS is greater than three OFDM symbols, additional samples after the first three symbols are not used.

Data Types: double
Complex Number Support: Yes

Channel estimation for data and pilot subcarriers based on the L-LTF, specified as a matrix or array of size NST-by-1-by-NR. NST is the number of occupied subcarriers. The second dimension corresponds to the single transmitted stream in the L-LTF. If multiple transmit antennas are used, the single transmitted stream includes the combined cyclic shifts. NR is the number of receive antennas.

Data Types: double
Complex Number Support: Yes

Noise variance estimate, specified as a nonnegative scalar.

Data Types: double

Channel bandwidth in MHz, specified as 'CBW5', 'CBW10', 'CBW20', 'CBW40', 'CBW80', or 'CBW160'.

Data Types: char

Algorithm parameters containing properties used during data recovery, specified as a wlanRecoveryConfig object. The configurable properties include the OFDM symbol sampling offset, the equalization method, and the type of pilot phase tracking. If you do not specify a cfgRec object, the default object property values described in wlanRecoveryConfig Properties are used in the data recovery.

OFDM symbol sampling offset represented as a fraction of the cyclic prefix (CP) length, specified as a scalar value from 0 to 1. This value indicates the start location for OFDM demodulation, relative to the beginning of the cyclic prefix. OFDMSymbolOffset = 0 represents the start of the cyclic prefix and OFDMSymbolOffset = 1 represents the end of the cyclic prefix.

Data Types: double

Equalization method, specified as 'MMSE' or 'ZF'.

  • 'MMSE' indicates that the receiver uses a minimum mean square error equalizer.

  • 'ZF' indicates that the receiver uses a zero-forcing equalizer.

Example: 'ZF'

Data Types: char | string

Pilot phase tracking, specified as 'PreEQ' or 'None'.

  • 'PreEQ' — Enables pilot phase tracking, which is performed before any equalization operation.

  • 'None' — Pilot phase tracking does not occur.

Data Types: char | string

Output Arguments

collapse all

Packet format, returned as 'Non-HT', 'HT-MF', 'HT-GF', or 'VHT'.

Algorithms

collapse all

Format Detection Processing

The format detection processing algorithm determines the packet format by detecting the modulation scheme of three symbols. Specifically, the input waveform, rxSig, should include three symbols, beginning with the first sample of the fifth symbol and ending with the last sample of the seventh symbol. Additional samples after the last sample of symbol seven are not used.

  • If the packet is non-HT, HT-MF, or VHT format, these are the three symbols following the L-LTF symbol.

  • If the packet is HT-GF format, these are the three symbols following the HT-LTF1 symbol.

Prior to demodulating any packet symbols, the wlanFormatDetect function checks the channel bandwidth input. If the channel bandwidth is 5 MHz or 10 MHz, the algorithm processing concludes and the function returns non-HT as the detected packet format. The channel estimate, noise variance estimate, and channel bandwidth are used in the recovery of L-SIG field bits from the fifth symbol, and in the demodulation and equalization of the sixth and seventh symbols.

The logic associated with format detection confirms the modulation scheme by using three consecutive symbols, beginning with the first signaling symbol (L-SIG or HT-SIG1) in sequence. As shown, the packet format prediction is made based on which symbols are BPSK or QBPSK modulated. This logic flow chart identifies the fifth, sixth, and seventh symbols of the packet as sym0, sym1, and sym2, respectively.

  • If sym0 is QBPSK, the packet format is HT-GF.

  • If sym0 is BPSK and the L-SIG parity check fails, a warning is issued. The format detection processing continues because the L-SIG parity check does not conclusively indicate an error in the MCS determination.

    • If the MCS is not zero, the packet format is non-HT.

    • If the MCS is zero, the modulation scheme of sym1 is detected.

      • If sym1 is QBPSK, the packet format is HT-MF.

      • If sym1 is BPSK, sym2 is detected.

        • If sym2 is QBPSK, the packet format is VHT.

        • If sym2 is BPSK, the packet format is non-HT.

Extended Capabilities

Introduced in R2016b

Was this topic helpful?