Main Content

wlanSpectralFlatness

Test spectral flatness

Description

pass = wlanSpectralFlatness(chanEst,format,cbw) tests spectral flatness by using channel estimates channelEst for WLAN packet format format and channel bandwidth cbw. The function determines the test result by comparing the spectral flatness measurements with the standard-specified range.

example

[pass,deviation,testSC] = wlanSpectralFlatness(chanEst,format,cbw) also returns deviation, the power deviation of each test subcarrier from the average power level across lower test subcarriers. The function splits the test subcarrier indices into upper and lower sets based on their absolute frequency and returns these indices as testSC.

Examples

collapse all

Configure and generate a very high throughput (VHT) waveform.

cfgVHT = wlanVHTConfig;
bits = [1; 0; 0; 1];
waveform = wlanWaveformGenerator(bits,cfgVHT);

Demodulate the VHT long training field (VHT-LTF).

field = "VHT-LTF";
ind = wlanFieldIndices(cfgVHT,field);
sym = wlanVHTLTFDemodulate(waveform(ind(1):ind(2),:),cfgVHT);

Perform channel estimation on the demodulated signal.

chanEst = wlanVHTLTFChannelEstimate(sym,cfgVHT);

Test the spectral flatness of the transmission, specifying the channel bandwidth and packet format, and display the result.

format = "VHT";
cbw = cfgVHT.ChannelBandwidth;
[pass,deviation,testSC] = wlanSpectralFlatness(chanEst,format,cbw);
disp(pass)
   1

Input Arguments

collapse all

Channel estimates for the data and pilot subcarriers, specified as a complex-valued array of size Nst-by-Nsts-by-Nr.

  • Nst is the number of occupied subcarriers.

  • Nsts is the number of space-time streams.

  • Nr is the number of receive antennas.

Data Types: single | double
Complex Number Support: Yes

WLAN packet format, specified as a string scalar or character vector corresponding to these IEEE® packet formats and 802.11™ standards.

ValueFormatStandard
"EHT" Extremely high throughput (EHT)IEEE P802.11be™/D1.2 [1]
"HE"High-efficiency single-user (HE SU), HE extended-range single-user (HE ER SU), HE multi-user (HE MU), or HE trigger-based (HE TB)IEEE Std 802.11ax™-2021 [2]
"VHT"Very high throughput (VHT)IEEE Std 802.11-2020 [3]
"HT"High throughput (HT)
"Non-HT"Non-high-throughput (non-HT)
"S1G"Sub 1 GHz (S1G)

Data Types: char | string

Channel bandwidth, specified as one of these values.

  • "CBW1" — Channel bandwidth of 1 MHz

  • "CBW2" — Channel bandwidth of 2 MHz

  • "CBW4" — Channel bandwidth of 4 MHz

  • "CBW5" — Channel bandwidth of 5 MHz

  • "CBW8" — Channel bandwidth of 8 MHz

  • "CBW10" — Channel bandwidth of 10 MHz

  • "CBW16" — Channel bandwidth of 16 MHz

  • "CBW20" — Channel bandwidth of 20 MHz

  • "CBW40" — Channel bandwidth of 40 MHz

  • "CBW80" — Channel bandwidth of 80 MHz

  • "CBW160" — Channel bandwidth of 160 MHz

  • "CBW320" — Channel bandwidth of 320 MHz

Valid values of this input depend on the value of the format input according to this table.

Value of formatValid Values of cbw
"EHT""CBW20", "CBW40", "CBW80", "CBW160", "CBW320"
"HE""CBW20", "CBW40", "CBW80", "CBW160"
"VHT""CBW20", "CBW40", "CBW80", "CBW160"
"HT""CBW20", "CBW40"
"Non-HT""CBW5", "CBW10", "CBW20", "CBW40", "CBW80", "CBW160"
"S1G""CBW1", "CBW2", "CBW4", "CBW8", "CBW16"

Data Types: char | string

Output Arguments

collapse all

Spectral flatness test result, returned as 1 or 0. If the measured spectral flatness falls within the standard-specified range, the received signal passes the test and the function returns this output as 1. Otherwise, the function returns this output as 0.

Data Types: logical

Power deviation of each test subcarrier from the average power level across lower test subcarriers, returned as a 1-by-2 cell array of real-valued matrices.

The first entry contains the power deviations per antenna across the lower test subcarriers in a matrix of size Nlsc-by-Nr, where Nlsc is the number of lower test subcarriers and Nr is the number of receive antennas.

The second entry contains the power deviations per antenna across the upper test subcarriers in a matrix of size Nusc-by-Nr, where Nusc is the number of upper test subcarriers.

Data Types: cell

Test subcarrier indices, returned as a 1-by-2 cell array of real-valued column vectors.

The first element contains the lower test subcarrier indices in a vector of length equal to the number of lower test subcarriers.

The second element contains the upper test subcarrier indices in a vector of length equal to the number of upper test subcarriers.

Data Types: cell

References

[1] IEEE P802.11be/D1.2. “Part 11: Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications. Amendment 8: Enhancements for Extremely High Throughput (EHT).” Draft Standard for Information technology — Telecommunications and information exchange between systems. Local and metropolitan area networks — Specific requirements.

[2] IEEE Std 802.11ax-2021 (Amendment to IEEE Std 802.11-2020). “Part 11: Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications. Amendment 1: Enhancements for High Efficiency WLAN.” IEEE Standard for Information technology — Telecommunications and information exchange between systems. Local and metropolitan area networks — Specific requirements.

[3] IEEE Std 802.11-2020 (Revision of IEEE Std 802.11-2016). “Part 11: Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications.” IEEE Standard for Information Technology — Telecommunications and Information Exchange between Systems— Local and Metropolitan Area Networks — Specific Requirements.

Extended Capabilities

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

Version History

Introduced in R2022a