Main Content

wlanNonHTOFDMDemodulate

R2026b

Demodulate fields of non-HT OFDM waveform

Description

sym = wlanNonHTOFDMDemodulate(rx,field,cfg) recovers a frequency-domain signal by OFDM-demodulating a non-high-throughput (non-HT) time-domain signal rx. The function demodulates rx by using non-HT transmission parameters cfg and signal field value field.

example

sym = wlanNonHTOFDMDemodulate(rx,field,bandwidth) specifies the channel bandwidth of the transmission.

sym = wlanNonHTOFDMDemodulate(___,Name=Value) specifies options using one or more name-value arguments in addition to any combination of input arguments from the previous syntaxes. For example, symOffset=0.5 indicates the start location for OFDM demodulation relative to the beginning of the cyclic prefix.

example

Examples

collapse all

Configure and generate a non-HT time-domain waveform.

cfg = wlanNonHTConfig(MCS=4);
bits = randi([0 1],8*cfg.PSDULength,1,"int8");
waveform = wlanWaveformGenerator(bits,cfg);

Transmit the waveform through an additive white Gaussian noise (AWGN) channel with a signal-to-noise ratio (SNR) of 30.

snr = 30;
rxWaveform = awgn(waveform,snr);

Extract the non-HT Data field from the received waveform.

field = "NonHT-Data";
ind = wlanFieldIndices(cfg,field);
rx = rxWaveform(ind(1):ind(2),:);

Recover the frequency-domain signal by OFDM demodulating the time-domain data signal.

sym = wlanNonHTOFDMDemodulate(rx,field,cfg);

Extract the data subcarriers from the demodulated signal.

info = wlanNonHTOFDMInfo(field,cfg);
sym = sym(info.DataIndices,:,:);

Recover the PSDU and confirm that it matches the transmitted PSDU.

noiseVarEst = 10^(-snr/10);
psdu = wlanNonHTDataBitRecover(sym,noiseVarEst,cfg);
isequal(bits,psdu)
ans = logical
   1

Configure and generate a non-HT Data signal with a channel bandwidth of 160 MHz and dynamic bandwidth operation.

bandwidth = "CBW160";
cfg = wlanNonHTConfig(ChannelBandwidth=bandwidth,PSDULength=1, ...
    SignalChannelBandwidth=true,BandwidthOperation="Dynamic");
bits = randi([0 1],8*cfg.PSDULength,1,"int8");
[range,~] = scramblerRange(cfg);
scramInit = randi(range);
y = wlanNonHTData(bits,cfg,scramInit);

Transmit the waveform through an AWGN channel with an SNR of 50.

snr = 50;
noiseVarEst = 10^(-snr/10);
rx = awgn(y,snr);

Recover the frequency-domain signal by OFDM-demodulating the non-HT Data signal, specifying an OFDM symbol sampling offset.

field = "NonHT-Data";
symOffset = 0.5;
sym = wlanNonHTOFDMDemodulate(rx,field,bandwidth,OFDMSymbolOffset=symOffset);

Extract the data subcarriers.

info = wlanNonHTOFDMInfo(field,bandwidth);
sym = sym(info.DataIndices,:);

Recover the first 20 MHz subchannel of the PSDU, enhancing the demapping of the OFDM subcarriers by specifying channel state information. Confirm that the received and transmitted PSDUs match.

csi = ones(48,1);
[psdu,scramInit] = wlanNonHTDataBitRecover(sym(1:48,:),noiseVarEst,csi,cfg);
isequal(bits,psdu)
ans = logical
   1

Recover and display bandwidth signaling by interpreting the scrambler state.

[bandwidth,dyn] = wlanInterpretScramblerState(scramInit)
bandwidth = 
'CBW160'
dyn = logical
   1

Input Arguments

collapse all

Received time-domain signal, specified as a complex-valued matrix of size Ns-by-Nr.

  • Ns is the number of time-domain samples. If Ns is not an integer multiple of the OFDM symbol length, Ls, for the specified field, then the function ignores the remaining mod(Ns,Ls) symbols.

  • Nr is the number of receive antennas.

Data Types: single | double
Complex Number Support: Yes

Field to be demodulated, specified as one of these values.

  • "L-LTF" — Demodulate legacy long training field (L-LTF).

  • "L-SIG" — Demodulate the legacy signaling (L-SIG) field.

  • "NonHT-Data" — Demodulate the non-HT Data field.

Data Types: char | string

Non-HT transmission parameters, specified as a wlanNonHTConfig object.

Channel bandwidth, specified as one of these values.

  • "CBW5" — Channel bandwidth of 5 MHz

  • "CBW10" — Channel bandwidth of 10 MHz

  • "CBW20" — Channel bandwidth of 20 MHz

  • "CBW40" — Channel bandwidth of 40 MHz for non-HT duplicate

  • "CBW80" — Channel bandwidth of 80 MHz for non-HT duplicate

  • "CBW160" — Channel bandwidth of 160 MHz for non-HT duplicate

  • "CBW320" — Channel bandwidth of 320 MHz for non-HT duplicate

Data Types: char | string

Name-Value Arguments

collapse all

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: symOffset=0.5

OFDM symbol sampling offset, as a fraction of the cyclic prefix length, specified as a scalar in the interval [0, 1].

The value that you specify indicates the start location for OFDM demodulation relative to the beginning of the cyclic prefix.

Example: 0.45

Data Types: double

Oversampling factor, specified as a scalar greater than or equal to 1. The oversampled cyclic prefix length must be an integer number of samples. For more information, see FFT-Based Oversampling.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Output Arguments

collapse all

Demodulated frequency-domain signal, returned as a complex-valued array of size Nsc-by-Nsym-by-Nr.

  • Nsc is the number of active occupied subcarriers in the demodulated field.

  • Nsym is the number of OFDM symbols.

  • Nr is the number of receive antennas.

Data Types: single | double
Complex Number Support: Yes

Algorithms

collapse all

Extended Capabilities

expand all

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

Version History

Introduced in R2020b

expand all