This is machine translation

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

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

wlanClosestReferenceSymbol

Find closest constellation points

Syntax

refSym = wlanClosestReferenceSymbol(sym,mod)
refSym = wlanClosestReferenceSymbol(sym,mod,phase)
refSym = wlanClosestReferenceSymbol(sym,cfg)
refSym = wlanClosestReferenceSymbol(sym,cfg,userNumber)

Description

example

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

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

example

refSym = wlanClosestReferenceSymbol(sym,cfg) returns the constellation points closest to the equalized symbols for single-user (SU) format configuration object cfg.

refSym = wlanClosestReferenceSymbol(sym,cfg,userNumber) returns the constellation points closest to the equalized symbols for the user specified by userNumber in a multiuser (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
Complex Number Support: Yes

Modulation scheme, specified as one of these values:

  • 'BPSK' – Indicates binary phase-shift keying (BPSK)

  • 'pi/2-BPSK' – Indicates π/2-BPSK

  • 'QPSK' – Indicates quadrature phase-shift keying (QPSK)

  • 'pi/2-QPSK' – Indicates π/2-QPSK

  • '16QAM' – Indicates 16-point quadrature amplitude modulation (16-QAM)

  • 'pi/2-16QAM' – Indicates π/2-16-QAM

  • '64QAM' – Indicates 64-QAM

  • 'pi/2-64QAM' – Indicates π/2-64-QAM

  • '256QAM' – Indicates 256-QAM

  • '1024QAM' – Indicates 1024-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

Physical layer (PHY) format configuration, specified as one of these objects: wlanHESUConfig, wlanHEMUConfig, wlanDMGConfig, wlanS1GConfig, wlanVHTConfig, wlanHTConfig, or wlanNonHTConfig.

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

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

If cfg is a wlanHEMUConfig 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.

Dependencies

This argument applies only when the cfg input is an object of type 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
Complex Number Support: Yes

Extended Capabilities

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

See Also

Functions

Objects

Introduced in R2019a