Demodulate VHT-LTF waveform
specifies
the OFDM symbol offset as a fraction of the cyclic prefix length.y
= wlanVHTLTFDemodulate(___,OFDMSymbolOffset
)
Create a VHT format configuration object.
vht = wlanVHTConfig;
Generate a VHT-LTF signal.
txVHTLTF = wlanVHTLTF(vht);
Add white noise to the signal.
rxVHTLTF = awgn(txVHTLTF,1);
Demodulate the received signal.
y = wlanVHTLTFDemodulate(rxVHTLTF,vht);
Specify a VHT format configuration object and generate a VHT-LTF.
vht = wlanVHTConfig; txltf = wlanVHTLTF(vht);
Multiply the transmitted VHT-LTF by 0.1 + 0.1i . Pass the signal through an AWGN channel.
rxltfNoNoise = txltf * complex(0.1,0.1);
rxltf = awgn(rxltfNoNoise,20,'measured');
Demodulated the received VHT-LTF with a symbol offset of 0.5.
dltf = wlanVHTLTFDemodulate(rxltf,vht,0.5);
Estimate the channel using the demodulated VHT-LTF. Plot the result.
chEst = wlanVHTLTFChannelEstimate(dltf,vht); scatterplot(chEst)
The estimate is very close to the previously introduced 0.1+0.1i multiplier.
Generate a VHT waveform. Extract and demodulate the VHT long training field (VHT-LTF) to estimate the channel coefficients. Recover the data field by using the channel estimate and use this field to determine the number of bit errors.
Configure a VHT-format configuration object with two paths.
vht = wlanVHTConfig('NumTransmitAntennas',2,'NumSpaceTimeStreams',2);
Generate a random PSDU and create the corresponding VHT waveform.
txPSDU = randi([0 1],8*vht.PSDULength,1); txSig = wlanWaveformGenerator(txPSDU,vht);
Pass the signal through a TGac 2x2 MIMO channel.
tgacChan = wlanTGacChannel('NumTransmitAntennas',2,'NumReceiveAntennas',2, ... 'LargeScaleFadingEffect','Pathloss and shadowing'); rxSigNoNoise = tgacChan(txSig);
Add AWGN to the received signal. Set the noise variance for the case in which the receiver has a 9-dB noise figure.
nVar = 10^((-228.6+10*log10(290)+10*log10(80e6)+9)/10); awgnChan = comm.AWGNChannel('NoiseMethod','Variance','Variance',nVar); rxSig = awgnChan(rxSigNoNoise);
Determine the indices for the VHT-LTF and extract the field from the received signal.
indVHT = wlanFieldIndices(vht,'VHT-LTF');
rxLTF = rxSig(indVHT(1):indVHT(2),:);
Demodulate the VHT-LTF and estimate the channel coefficients.
dLTF = wlanVHTLTFDemodulate(rxLTF,vht); chEst = wlanVHTLTFChannelEstimate(dLTF,vht);
Extract the VHT-Data field and recover the information bits.
indData = wlanFieldIndices(vht,'VHT-Data');
rxData = rxSig(indData(1):indData(2),:);
rxPSDU = wlanVHTDataRecover(rxData,chEst,nVar,vht);
Determine the number of bit errors.
numErrs = biterr(txPSDU,rxPSDU)
numErrs = 0
Recover VHT-Data field bits for a multiuser transmission using channel estimation on a VHT-LTF field over a quasi-static fading channel.
Create a VHT configuration object having a 160 MHz channel bandwidth, two users, and four transmit antennas. Assign one space-time stream to the first user and three space-time streams to the second user.
cbw = 'CBW160'; numSTS = [1 3]; vht = wlanVHTConfig('ChannelBandwidth',cbw,'NumUsers',2, ... 'NumTransmitAntennas',4,'NumSpaceTimeStreams',numSTS);
Because there are two users, the PSDU length is a 1-by-2 row vector.
psduLen = vht.PSDULength
psduLen = 1×2
1050 3156
Generate multiuser input data. This data must be in the form of a 1-by- N cell array, where N is the number of users.
txDataBits{1} = randi([0 1],8*vht.PSDULength(1),1); txDataBits{2} = randi([0 1],8*vht.PSDULength(2),1);
Generate VHT-LTF and VHT-Data field signals.
txVHTLTF = wlanVHTLTF(vht); txVHTData = wlanVHTData(txDataBits,vht);
Pass the data field for the first user through a 4x1 channel because it consists of a single space-time stream. Pass the second user's data through a 4x3 channel because it consists of three space-time streams. Apply white Gaussian noise to each user signal.
snr = 15; H1 = 1/sqrt(2)*complex(randn(4,1),randn(4,1)); H2 = 1/sqrt(2)*complex(randn(4,3),randn(4,3)); rxVHTData1 = awgn(txVHTData*H1,snr,'measured'); rxVHTData2 = awgn(txVHTData*H2,snr,'measured');
Repeat the process for the VHT-LTF fields.
rxVHTLTF1 = awgn(txVHTLTF*H1,snr,'measured'); rxVHTLTF2 = awgn(txVHTLTF*H2,snr,'measured');
Calculate the received signal power for both users and use it to estimate the noise variance.
powerDB1 = 10*log10(var(rxVHTData1)); noiseVarEst1 = mean(10.^(0.1*(powerDB1-snr))); powerDB2 = 10*log10(var(rxVHTData2)); noiseVarEst2 = mean(10.^(0.1*(powerDB2-snr)));
Estimate the channel characteristics using the VHT-LTF fields.
demodVHTLTF1 = wlanVHTLTFDemodulate(rxVHTLTF1,cbw,numSTS); chanEst1 = wlanVHTLTFChannelEstimate(demodVHTLTF1,cbw,numSTS); demodVHTLTF2 = wlanVHTLTFDemodulate(rxVHTLTF2,cbw,numSTS); chanEst2 = wlanVHTLTFChannelEstimate(demodVHTLTF2,cbw,numSTS);
Recover VHT-Data field bits for the first user and compare against the original payload bits.
rxDataBits1 = wlanVHTDataRecover(rxVHTData1,chanEst1,noiseVarEst1,vht,1); [~,ber1] = biterr(txDataBits{1},rxDataBits1)
ber1 = 0.4983
Determine the number of bit errors for the second user.
rxDataBits2 = wlanVHTDataRecover(rxVHTData2,chanEst2,noiseVarEst2,vht,2); [~,ber2] = biterr(txDataBits{2},rxDataBits2)
ber2 = 0.0972
The bit error rates are quite high because there is no precoding to mitigate the interference between streams. This is especially evident for the user 1 receiver because it receives energy from the three streams intended for user 2. The example is intended to show the workflow and proper syntaxes for the LTF demodulate, channel estimation, and data recovery functions.
x
— Time-domain input signalTime-domain input signal corresponding to
the VHT-LTF of the PPDU, specified as a matrix of
size
NS-by-NR.
NS is
the number of samples.
NR is
the number of receive antennas.
NS can
be greater than or equal to the VHT-LTF length as
indicated by cfg
. Trailing
samples at the end of x
are
not used.
Data Types: double
Complex Number Support: Yes
cfg
— VHT format configurationwlanVHTConfig
objectVHT format configuration, specified as a
wlanVHTConfig
object.
cbw
— Channel bandwidth 'CBW20'
| 'CBW40'
| 'CBW80'
| 'CBW160'
Channel bandwidth, specified as
'CBW20'
,
'CBW40'
,
'CBW80'
, or
'CBW160'
. If the transmission
has multiple users, the same channel bandwidth is
applied to all users.
Data Types: char
| string
numSTS
— Number of space-time streamsNumber of space-time streams in the transmission, specified as a scalar or vector.
For a single user, the number of space-time streams is a scalar integer from 1 to 8.
For multiple users, the number of space-time streams is a 1-by-NUsers vector of integers from 1 to 4, where the vector length, NUsers, is an integer from 1 to 4.
Example: [1 3 2]
indicates
that one space-time stream is assigned to user 1,
three space-time streams are assigned to user 2,
and two space-time streams are assigned to user
3.
The sum of the space-time stream vector elements must not exceed eight.
Data Types: double
OFDMSymbolOffset
— OFDM symbol sampling offset0.75
(default) | scalar in the interval [0, 1]OFDM symbol sampling offset represented as a fraction of the cyclic prefix (CP)
length, specified as a scalar in the interval [0, 1]. The value you specify indicates
the start location for OFDM demodulation relative to the beginning of the cyclic prefix.
The value 0
represents the start of the cyclic prefix and the value
1
represents the end of the cyclic prefix.
Data Types: double
y
— Demodulated VHT-LTF waveformDemodulated VHT-LTF waveform, returned as an NST-by-NSYM-by-NR array. NST is the number of data and pilot subcarriers, NSYM is the number of OFDM symbols in the VHT-LTF, and NR is the number of receive antennas.
If the received VHT-LTF signal, x
, is empty,
then the output is also empty.
Data Types: double
Complex Number Support: Yes
The very high throughput long training field (VHT-LTF) is located between the VHT-STF and VHT-SIG-B portion of the VHT packet.
It is used for MIMO channel estimation and pilot subcarrier tracking. The VHT-LTF includes one VHT long training symbol for each spatial stream indicated by the selected MCS. Each symbol is 4 μs long. A maximum of eight symbols are permitted in the VHT-LTF.
For a detailed description of the VHT-LTF, see section 21.3.8.3.5 of IEEE® Std 802.11™-2016.
[1] IEEE Std 802.11ac™-2013 IEEE Standard for Information technology — Telecommunications and information exchange between systems — Local and metropolitan area networks — Specific requirements — Part 11: Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications — Amendment 4: Enhancements for Very High Throughput for Operation in Bands below 6 GHz.
[2] IEEE Std 802.11™-2012 IEEE Standard for Information technology — Telecommunications and information exchange between systems — Local and metropolitan area networks — Specific requirements — Part 11: Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications.
[1] IEEE Std 802.11ac™-2013 Adapted and reprinted with permission from IEEE. Copyright IEEE 2013. All rights reserved.
You have a modified version of this example. Do you want to open this example with your edits?