# wlanEHTDataNoiseEstimate

## Syntax

## Description

estimates the variance of additive white Gaussian noise in an extremely high-throughput
(EHT) transmission configured by `nest`

= wlanEHTDataNoiseEstimate(`X`

,`chanEstSSPilots`

,`cfg`

)`cfg`

. For the estimate, the function
uses the demodulated pilot symbols in the EHT-Data field, `X`

, and the
single-stream channel estimates at pilot subcarriers, `chanEstSSPilots`

.
The noise estimate is averaged over the number of OFDM symbols and receive antennas.

## Examples

### Estimate Noise Power Using EHT-Data Field

Create a configuration object for an EHT MU packet of non-OFDMA PPDU type and a channel bandwidth of 320 MHz. Set an initial signal-to-noise ratio of 10 dB.

```
cfg = wlanEHTMUConfig("CBW320");
snr = 10;
```

Extract the OFDM information of the EHT-Data field in the configuration. Change the signal-to-noise ratio to remove the noise contribution from the null subcarriers.

```
ofdmInfo = wlanEHTOFDMInfo("EHT-Data",cfg);
snrValue = snr-10*log10(ofdmInfo.FFTLength/ofdmInfo.NumTones);
```

Extract the field indices that correspond to the EHT-LTF and the EHT-Data field.

indEHTLTF = wlanFieldIndices(cfg,"EHT-LTF"); indData = wlanFieldIndices(cfg,"EHT-Data");

Use the `psduLength`

object function to get the PSDU length of the configuration in bytes. Multiply by eight to convert the unit of length to bits.

cfgLength = psduLength(cfg)*8;

Generate a random sequence of bits to transmit. The number of bits is equal to the PSDU length.

txBits = randi([0 1],cfgLength,1);

Generate a time-domain waveform for the configuration and bits. Pass the waveform through an AWGN channel.

tx = wlanWaveformGenerator(txBits,cfg); rx = awgn(tx,snrValue);

Extract the indices of the received waveform that correspond to the EHT-LTF. Demodulate the EHT-LTF and perform channel estimation at the single-stream pilots.

```
rxEHTLTF = rx(indEHTLTF(1):indEHTLTF(2),:);
ehtltfDemod = wlanEHTDemodulate(rxEHTLTF,"EHT-LTF",cfg);
[~,chanEstSSPilots] = wlanEHTLTFChannelEstimate(ehtltfDemod,cfg);
```

Extract the indices of the received waveform that correspond to the EHT-Data field. Demodulate the EHT-Data field and extract the demodulated symbols that correspond to the pilot subcarriers.

```
rxData = rx(indData(1):indData(2),:);
demodSym = wlanEHTDemodulate(rxData,"EHT-Data",cfg);
X = demodSym(ofdmInfo.PilotIndices,:,:);
```

Estimate the noise power of `X`

from the channel estimate at the pilot symbols.

nest = wlanEHTDataNoiseEstimate(X,chanEstSSPilots,cfg);

Extract the demodulated symbols that correspond to the data subcarriers. Recover the received bits from the demodulated data field and verify that they match the transmitted bits.

dataDemod = demodSym(ofdmInfo.DataIndices); rxBits = wlanEHTDataBitRecover(dataDemod,nest,cfg); disp(isequal(txBits,rxBits))

1

### Estimate Noise Power of Resource Unit in EHT MU Transmission

Create a configuration object for an EHT MU packet. Set the allocation index to `43`

. This setting specifies a configuration with three users. Two users each have a 52-tone RU. The third user has a 106+26-tone MRU.

cfg = wlanEHTMUConfig(43);

Set an initial signal-to-noise ratio of 30 dB.

snr = 30;

Extract the OFDM information that corresponds to the second resource unit and the EHT-Data field. Change the signal-to-noise ratio to remove the noise contribution from the null subcarriers.

```
ruNumber = 2;
ofdmInfo = wlanEHTOFDMInfo("EHT-Data",cfg,ruNumber);
snrValue = snr-10*log10(ofdmInfo.FFTLength/ofdmInfo.NumTones);
```

Extract the field indices that correspond to the EHT-LTF and the EHT-Data field.

indEHTLTF = wlanFieldIndices(cfg,"EHT-LTF"); indData = wlanFieldIndices(cfg,"EHT-Data");

Use the `psduLength`

object function to get the PSDU length of the configuration in bytes. Multiply by eight to convert the unit of length to bits.

cfgLength = psduLength(cfg)*8;

Generate a random sequence of bits to transmit. The number of bits is equal to the PSDU length of the second RU.

txBits = randi([0 1],cfgLength(2),1);

Generate a time-domain waveform for the configuration and bits. Pass the waveform through an AWGN channel.

tx = wlanWaveformGenerator(txBits,cfg); rx = awgn(tx,snrValue);

Extract the indices of the received waveform that correspond to the EHT-LTF. Demodulate the EHT-LTF and perform channel estimation at the single-stream pilots.

```
rxEHTLTF = rx(indEHTLTF(1):indEHTLTF(2),:);
ehtltfDemod = wlanEHTDemodulate(rxEHTLTF,"EHT-LTF",cfg,ruNumber);
[~,chanEstSSPilots] = wlanEHTLTFChannelEstimate(ehtltfDemod,cfg,ruNumber);
```

Extract the indices of the received waveform that correspond to the EHT-Data field. Demodulate the EHT-Data field and extract the demodulated symbols that correspond to the pilot subcarriers.

```
rxData = rx(indData(1):indData(2),:);
demodSym = wlanEHTDemodulate(rxData,"EHT-Data",cfg,ruNumber);
X = demodSym(ofdmInfo.PilotIndices,:,:);
```

Estimate the noise power from the channel estimate at the pilot symbols.

nest = wlanEHTDataNoiseEstimate(X,chanEstSSPilots,cfg,ruNumber);

Extract the demodulated symbols that correspond to the data subcarriers. Recover the received bits from the demodulated data field and verify that they match the transmitted bits.

dataDemod = demodSym(ofdmInfo.DataIndices,:,:); userIndex = ruNumber; rxBits = wlanEHTDataBitRecover(dataDemod,nest,cfg,userIndex); disp(isequal(txBits,rxBits))

1

## Input Arguments

`X`

— Demodulated EHT-Data pilot symbols

3-D array

Demodulated EHT-Data pilot symbols, specified as an
*N _{SP}*-by-

*N*-by-

_{SYM}*N*array.

_{R}*N*is the number of pilot subcarriers,

_{SP}*N*is the number of demodulated EHT-Data symbols, and

_{SYM}*N*is the number of receive antennas.

_{R}**Data Types: **`single`

| `double`

**Complex Number Support: **Yes

`chanEstSSPilots`

— Channel estimate for pilot subcarriers

3-D array

Channel estimate at each pilot subcarrier location for each EHT long training field
(EHT-LTF) symbol, returned as
an
*N _{SP}*-by-

*N*-by-

_{LTF}*N*array.

_{R}*N*is the number of pilot subcarriers,

_{SP}*N*is the number of demodulated EHT-LTF OFDM symbols, and

_{LTF}*N*is the number of receive antennas. The function assumes that this estimate is performed with one space-time stream at the transmitter.

_{R}**Data Types: **`single`

| `double`

**Complex Number Support: **Yes

`cfg`

— PHY format configuration

`wlanEHTMUConfig`

object | `wlanEHTTBConfig`

object | `wlanEHTRecoveryConfig`

| object

Physical layer (PHY) format configuration, specified as an object of type `wlanEHTMUConfig`

, `wlanEHTTBConfig`

, or `wlanEHTRecoveryConfig`

.

`ruNumber`

— Number of RU or MRU of interest

positive integer

Number of the RU or MRU of interest, specified as a positive integer. This input specifies the location of the RU or MRU in the channel. For example, consider a 20 MHz transmission with one 106+26-tone RU, one 52+26-tone MRU, and one 26-tone RU, in order of absolute frequency. For this allocation:

RU 1 corresponds to the 106+26-tone MRU at the lowest absolute frequency (size 106+26, index 1).

RU 2 corresponds to the 52+26-tone MRU at the next lowest absolute frequency (size 52+26, index 2).

RU 3 corresponds to the 26-tone RU at the highest absolute frequency (size 26, index 3).

**Note**

For an OFDMA-type EHT MU PPDU, this input is required.

For a non-OFDMA-type EHT MU PPDU, this input is not required.

For an EHT trigger-based (EHT TB) PPDU, this input is not required.

This input is not required when you specify

`cfg`

as a`wlanEHTRecoveryConfig`

object.

## Output Arguments

`nest`

— Noise variance estimate

positive real scalar

Noise variance estimate, returned as a positive real scalar.

**Data Types: **`single`

| `double`

## More About

### EHT-LTF

The EHT-LTF is located between the EHT-STF and data
field of an EHT packet. As described in Section 36.3.12.10 of IEEE^{®} P802.11be™/D3.0 [1] , the
receiver can use the EHT-LTF to estimate the MIMO channel between the set of constellation
mapper outputs and the receive chains. An EHT PPDU supports two EHT-LTF types: 2x EHT-LTF
and 4x EHT-LTF. These determine symbol durations of 6.4 and 12.8 µs, respectively. In these
durations, guard intervals are omitted.

The number of EHT-LTF symbols transmitted can be one, two, four, six, or eight. The following table, adapted from Table 36-43 in [1], shows how the initial number of EHT-LTF symbols depends on the number of space-time streams.

N_{STS,total} | Initial N_{SYM} |
---|---|

1 | 1 |

2 | 2 |

3 | 4 |

4 | 4 |

5 | 6 |

6 | 6 |

7 | 8 |

8 | 8 |

If the initial number of EHT-LTF symbols is less than eight, you can add extra symbols to the transmission to improve channel estimation. If you add symbols, the total number of symbols must be two, four, or eight, and must not be more than double the initial number of symbols.

## Extended Capabilities

### C/C++ Code Generation

Generate C and C++ code using MATLAB® Coder™.

Code generation is not supported when you specify `cfg`

as an object
of type `wlanEHTRecoveryConfig`

.

## Version History

**Introduced in R2023b**

### R2023b: EHT recovery support

You can specify the `cfg`

input as a
`wlanEHTRecoveryConfig`

object.

## See Also

### Functions

### Topics

## MATLAB Command

You clicked a link that corresponds to this MATLAB command:

Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

You can also select a web site from the following list:

## How to Get Best Site Performance

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

### Americas

- América Latina (Español)
- Canada (English)
- United States (English)

### Europe

- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)

- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)