Main Content

wlanClosestReferenceSymbol

Find closest constellation points

Description

refSym = wlanClosestReferenceSymbol(sym,mod) returns the constellation points closest to equalized symbols sym for modulation scheme mod.

example

refSym = wlanClosestReferenceSymbol(sym,mod,phase) returns the constellation points closest to the equalized symbols with counterclockwise rotation phase.

refSym = wlanClosestReferenceSymbol(sym,cfg) returns the constellation points closest to the equalized symbols for cfg, a configuration object that parameterizes a single-user (SU) transmission or a recovered high-efficiency (HE) transmission.

example

refSym = wlanClosestReferenceSymbol(sym,cfg,userNumber) returns the constellation points closest to the equalized symbols for the user specified by userNumber in a multi-user (MU) transmission and MU-format configuration object cfg.

Examples

collapse all

Find the closest reference symbols to a received set of noisy symbols for 64-QAM.

Create a high-efficiency single-user-format (HE-SU-format) configuration object, specifying a modulation and coding scheme (MCS) with 64-QAM.

cfg = wlanHESUConfig('MCS',6);

Obtain the PSDU length.

psduLength = getPSDULength(cfg); 

Generate a waveform for a payload of randomly generated bits and the specified configuration.

bits = randi([0 1],8*psduLength,1,'int8');
waveform = wlanWaveformGenerator(bits,cfg);

Generate noise to be added to the signal, specifying the signal-to-noise ratio (SNR).

SNR = 10;
rxWaveform = awgn(waveform,SNR);

Get the field indices and extract the HE-Data field.

ind =  wlanFieldIndices(cfg);
sym = rxWaveform(ind.HEData(1):ind.HEData(2));

Find the closest reference symbols for the specified modulation scheme.

mod = '64QAM';
refSym = wlanClosestReferenceSymbol(sym,mod);

Find the closest reference symbols to a received set of noisy symbols in a DMG-format configuration.

Create a DMG-format configuration object, specifying the MCS.

cfg = wlanDMGConfig('MCS',10);

Generate a waveform for a payload of randomly generated bits and the specified configuration.

bits = randi([0 1],8*cfg.PSDULength,1,'int8');
waveform = wlanWaveformGenerator(bits,cfg);

Generate noise to be added to the signal, specifying the SNR.

SNR = 10;
rxWaveform = awgn(waveform,SNR);

Get the field indices and extract the DMG-Data field.

ind =  wlanFieldIndices(cfg);
sym = rxWaveform(ind.DMGData(1):ind.DMGData(2));

Find the closest reference symbols for the specified configuration.

refSym = wlanClosestReferenceSymbol(sym,cfg);

Input Arguments

collapse all

Equalized symbols, specified as a complex-valued array.

Data Types: double | single
Complex Number Support: Yes

Modulation scheme, specified as one of these values:

  • 'BPSK' — Binary phase-shift keying (BPSK)

  • 'pi/2-BPSK' — π/2-BPSK

  • 'QPSK' — Quadrature phase-shift keying (QPSK)

  • 'pi/2-QPSK' — π/2-QPSK

  • '16QAM' — 16-point quadrature amplitude modulation (16-QAM)

  • 'pi/2-16QAM' — π/2-16-QAM

  • '64QAM' — 64-QAM

  • 'pi/2-64QAM' — π/2-64-QAM

  • '256QAM' — 256-QAM

  • '1024QAM' — 1024-QAM

  • '4096QAM' — 4096-QAM

Data Types: char | string

Counterclockwise rotation, in radians, specified as a real-valued scalar or real-valued row vector. To return reference symbols for different phases, specify phase as a row vector in which each element represents a chosen phase.

Note

The rotations you specify in phase apply only to the constellation points returned in refSym, and not to the equalized symbols specified in sym.

Data Types: double

Number assigned to user of interest, specified as a positive integer in the interval [1, Nu], where Nu is the number of users in the transmission.

This argument is required when you specify the cfg input as an object of type wlanHEMUConfig, wlanS1GConfig, or wlanVHTConfig.

When you specify cfg as a wlanEHTMUConfig object,

  • this argument is required if the PPDU type is OFDMA, or non-OFDMA with multiple users.

  • this argument is not required for a non-OFDMA PPDU with a single user.

If cfg is a wlanHEMUConfig or wlanEHTMUConfig object, Nu is equal to the number of elements in the value of its User property. If cfg is a wlanS1GConfig or wlanVHTConfig object, Nu is equal to the value of its NumUsers property.

Dependencies

This argument applies only when the cfg input is an object of type wlanEHTMUConfig, wlanHEMUConfig, wlanS1GConfig, or wlanVHTConfig.

Data Types: double

Output Arguments

collapse all

Constellation points closest to input symbols, returned as a complex-valued column vector. Each entry of refSym is the constellation point closest to the corresponding entry of the sym input; refSym is the same size as sym.

Data Types: double | single
Complex Number Support: Yes

Extended Capabilities

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

Version History

Introduced in R2019a

expand all

See Also

Functions

Objects