# wlanEHTEqualize

## Syntax

## Description

```
[
```

specifies the user index in addition to any input argument combination from the previous
syntax. This syntax applies only when `eqSym`

,`csi`

] = wlanEHTEqualize(___,`userIdx`

)`cfg`

is a `wlanEHTMUConfig`

object and `field`

is `"EHT-Data"`

.

## Examples

### Equalize U-SIG Symbols

Create a WLAN EHT multi-user configuration object with a channel bandwidth of 320 MHz.

```
cfg = wlanEHTMUConfig("CBW320");
cbw = cfg.ChannelBandwidth;
```

Generate a time-domain waveform for the configuration.

tx = wlanWaveformGenerator([1;0;0;1],cfg);

Pass the waveform through an AWGN channel with a signal-to-noise ratio of 20 dB.

snr = 20; rx = awgn(tx,snr);

Get the field indices for the configuration.

ind = wlanFieldIndices(cfg);

Isolate and demodulate the L-LTF. Use the demodulated symbols to get channel and noise estimates.

```
rxLLTF = rx(ind.LLTF(1):ind.LLTF(2),:);
lltfDemod = wlanEHTDemodulate(rxLLTF,"L-LTF",cfg);
chEstLLTF = wlanLLTFChannelEstimate(lltfDemod,cfg);
noiseEst = wlanLLTFNoiseEstimate(lltfDemod);
```

Isolate and demodulate the U-SIG field.

```
rxUSIG = rx(ind.USIG(1):ind.USIG(2),:);
usigDemod = wlanEHTDemodulate(rxUSIG,"U-SIG",cfg);
```

Estimate the channel at the U-SIG field.

chEst = wlanPreEHTChannelEstimate(usigDemod,chEstLLTF,cbw);

Use the channel and noise estimates to equalize the demodulated U-SIG symbols.

`[eqSym,csi] = wlanEHTEqualize(usigDemod,chEst,noiseEst,cfg,"U-SIG");`

### Equalize EHT-Data Symbols

Create a WLAN EHT multi-user configuration object with the allocation index set to `48`

. This setting specifies an OFDMA configuration with one 106+26-tone multiple resource unit (MRU) and one 106-tone resource unit (RU) in a 20 MHz channel. Both resource units have one user.

cfg = wlanEHTMUConfig(48); cbw = cfg.ChannelBandwidth;

Generate a time-domain waveform for the configuration.

tx = wlanWaveformGenerator([1;0;0;1],cfg);

Pass the waveform through an AWGN channel with a signal-to-noise ratio of 15 dB.

snr = 15; rx = awgn(tx,snr);

Get the field indices for the configuration.

ind = wlanFieldIndices(cfg);

Isolate and demodulate the L-LTF. Use the demodulated symbols to estimate the noise power.

```
rxLLTF = rx(ind.LLTF(1):ind.LLTF(2),:);
lltfDemod = wlanEHTDemodulate(rxLLTF,"L-LTF",cfg);
noiseEst = wlanLLTFNoiseEstimate(lltfDemod);
```

Isolate and demodulate the EHT-LTF for the 106+26-tone MRU. Use the demodulated symbols to estimate the channel.

```
rxEHTLTF = rx(ind.EHTLTF(1):ind.EHTLTF(2),:);
ruNumber = 1;
ehtltfDemod = wlanEHTDemodulate(rxEHTLTF,"EHT-LTF",cfg,ruNumber);
chEst = wlanEHTLTFChannelEstimate(ehtltfDemod,cfg,ruNumber);
```

Isolate and demodulate the HE-Data field for the 106+26-tone MRU.

```
rxData = rx(ind.EHTData(1):ind.EHTData(2),:);
sym = wlanEHTDemodulate(rxData,"EHT-Data",cfg,ruNumber);
```

Use the channel and noise estimates to equalize the demodulated EHT-Data symbols for the MRU's user.

```
userIdx = ruNumber;
[eqSym,csi] = wlanEHTEqualize(sym,chEst,noiseEst,cfg,"EHT-Data",userIdx);
```

## Input Arguments

`sym`

— Demodulated EHT field symbols

3-D array

Demodulated EHT field symbols, specified as a 3-D array. The size of the array is
*N _{SC}*-by-

*N*-by-

_{SYM}*N*, where

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

_{SC}*N*is the number of OFDM symbols, and

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

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

| `double`

`chEst`

— Channel estimate

matrix | 3-D array

Channel estimate, specified as a matrix or 3-D array. The size of this input must be:

*N*-by-1-by-_{SC}*N*if the_{R}`field`

input is not`"EHT-Data"`

*N*-by-_{SC}*N*-by-_{STS}*N*if the field input is_{R}`"EHT-Data"`

*N _{STS}* is the number of space-time streams
specified in the

`cfg`

input.**Data Types: **`single`

| `double`

**Complex Number Support: **Yes

`noiseEst`

— Noise estimate

nonnegative real scalar

Noise estimate, specified as a nonnegative real scalar. This input determines how the function equalizes the input symbols. For more information, see Equalization Methods.

**Data Types: **`double`

| `single`

`cfg`

— Format configuration

`wlanEHTMUConfig`

object | `wlanEHTTBConfig`

object | `wlanEHTRecoveryConfig`

object

Format configuration, specified as one of these objects: `wlanEHTMUConfig`

, `wlanEHTTBConfig`

, or `wlanEHTRecoveryConfig`

.

`field`

— Field to equalize

`"L-SIG"`

| `"RL-SIG"`

| `"U-SIG"`

| `"EHT-SIG"`

| `"EHT-Data"`

Field to equalize, specified as one of these values:

`"L-SIG"`

— Equalize the legacy signal (L-SIG) field.`"RL-SIG"`

— Equalize the repeated legacy signal field (RL-SIG) field.`"U-SIG"`

— Equalize the universal signal (U-SIG) field.`"EHT-SIG"`

— Equalize the EHT signal (EHT-SIG) field.`"EHT-Data"`

— Equalize the EHT-Data field.

**Data Types: **`char`

| `string`

`userIdx`

— User index

positive integer

User index, specified as a positive integer.

**Note**

This input is required only when `cfg`

is a `wlanEHTMUConfig`

object and `field`

is
`"EHT-Data"`

. If you specify this input in any other situation, the
function ignores it.

## Output Arguments

`eqSym`

— Equalized symbols

matrix | 3-D array

Equalized symbols, returned as a matrix or 3-D array. The size of this output
depends on the value of the `field`

input:

If

`field`

is`"U-SIG"`

,`eqSym`

has size*L***N*-by-_{SC}*N*, where_{SYM}*N*is the number of data, pilot, or combined data and pilot subcarriers,_{SC}*N*is the number of OFDM symbols, and_{SYM}*L*is the number of subblocks.*L*is 1 if the channel bandwidth is 80 MHz or less, 2 if the channel bandwidth is 160 MHz, and 4 if the channel bandwidth is 320 MHz.If

`field`

is`"EHT-SIG"`

, the size further depends on the PPDU type of`cfg`

:PPDU Type Size of `eqSym`

Single-user or sounding NDP *N*-by-_{SC}*N*_{SYM}Multi-user non-OFDMA *C***N*-by-_{SC}*N*_{SYM}OFDMA *C***L***N*-by-_{SC}*N*_{SYM}In the table,

*C*is the number of content channels in the transmission. It is equal to 1 for a 20 MHz channel and equal to 2 for all other bandwidths.If

`field`

is`"EHT-Data"`

,`eqSym`

has size*N*-by-_{SC}*N*-by-_{SYM}*N*, where_{STS}*N*is the number of subcarriers in the_{SC}`sym`

input,*N*is the number of OFDM symbols, and_{SYM}*N*is the number of space-time streams in the_{STS}`chEst`

input.If

`field`

has any other value,`eqSym`

has size*N*-by-_{SC}*N*, where_{SYM}*N*is the number of data, pilot, or combined data and pilot subcarriers in a 20 MHz channel bandwidth._{SC}

**Data Types: **`double`

| `single`

**Complex Number Support: **Yes

`csi`

— Channel state information

real-valued matrix

Channel state information, returned as a real-valued matrix. The size of the matrix
is
*N _{SC}*-by-

*N*, where

_{STS}*N*is equal to the first dimension of the

_{SC}`eqSym`

output.**Data Types: **`single`

| `double`

## More About

### Equalization Methods

`wlanEHTEqualize`

uses one of two equalization methods: zero forcing (ZF)
or minimum mean square error (MMSE).

ZF equalization compensates for the effects of channel distortion by assuming the channel to be noiseless and by designing a filter using the inverse of the channel matrix. If the channel matrix is invertible and the channel is truly noiseless, the output of the equalizer is identical to the transmitted signal. However, if the channel is noisy, this method performs poorly because the filter exaggerates the effects of the noise.

MMSE equalization minimizes the mean squared error (MSE) between the original transmitted signal and the equalizer output. This method performs better for noisy channels because, unlike ZF, it takes the effects of noise into account. However, it is more computationally complex than ZF. Therefore, ZF is better suited to noiseless channels than MMSE.

Because of these facts, `wlanEHTEqualize`

uses ZF when the `noiseEst`

input is
`0`

and MMSE for all other values.

## Extended Capabilities

### C/C++ Code Generation

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

## Version History

**Introduced in R2023b**

### R2024b: Generate C/C++ code for EHT blind recovery

You can now generate C and C++ code using MATLAB^{®}
Coder™ when you specify the `cfg`

input as a
`wlanEHTRecoveryConfig`

object.

## See Also

### Functions

### Objects

## 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)