Transmit and Recover L-SIG, VHT-SIG-A, and VHT-SIG-B in Fading Channel
Transmit a VHT waveform through a noisy MIMO channel. Extract the L-SIG, VHT-SIG-A, and VHT-SIG-B fields and verify that they were correctly recovered.
Set the parameters used throughout the example.
cbw = 'CBW40'; % Channel bandwidth fs = 40e6; % Sample rate (Hz) ntx = 2; % Number of transmit antennas nsts = 2; % Number of space-time streams nrx = 3; % Number of receive antennas
Create a VHT configuration object that supports a 2x2 MIMO transmission and has an APEP length of 2000.
vht = wlanVHTConfig('ChannelBandwidth',cbw,'APEPLength',2000, ... 'NumTransmitAntennas',ntx,'NumSpaceTimeStreams',nsts, ... 'SpatialMapping','Direct','STBC',false);
Generate a VHT waveform containing a random PSDU.
txPSDU = randi([0 1],vht.PSDULength*8,1); txPPDU = wlanWaveformGenerator(txPSDU,vht);
Create a 2x2 TGac channel and an AWGN channel with an SNR=10 dB.
tgacChan = wlanTGacChannel('SampleRate',fs,'ChannelBandwidth',cbw, ... 'NumTransmitAntennas',ntx,'NumReceiveAntennas',nrx, ... 'LargeScaleFadingEffect','Pathloss and shadowing', ... 'DelayProfile','Model-C'); chNoise = comm.AWGNChannel('NoiseMethod','Signal to noise ratio (SNR)',... 'SNR',10);
Pass the VHT waveforms through a 2x2 TGac channel and add the AWGN channel noise.
rxPPDU = chNoise(tgacChan(txPPDU));
Add additional white noise corresponding to a receiver with a 9 dB noise figure. The noise variance is equal to k*T*B*F, where k is Boltzmann's constant, T is the ambient temperature, B is the channel bandwidth (sample rate), and F is the receiver noise figure.
nVar = 10^((-228.6+10*log10(290) + 10*log10(fs) + 9 )/10); rxNoise = comm.AWGNChannel('NoiseMethod','Variance','Variance',nVar); rxPPDU = rxNoise(rxPPDU);
Find the start and stop indices for all component fields of the PPDU.
ind = wlanFieldIndices(vht)
ind = struct with fields:
LSTF: [1 320]
LLTF: [321 640]
LSIG: [641 800]
VHTSIGA: [801 1120]
VHTSTF: [1121 1280]
VHTLTF: [1281 1600]
VHTSIGB: [1601 1760]
VHTData: [1761 25600]
The preamble is contained in the first 1760 symbols. Plot the preamble.
plot(abs(rxPPDU(1:1760)))
Extract the L-LTF from the received PPDU using the start and stop indices determined by the wlanFieldIndices
function. Demodulate the L-LTF and estimate the channel coefficients.
rxLLTF = rxPPDU(ind.LLTF(1):ind.LLTF(2),:); demodLLTF = wlanLLTFDemodulate(rxLLTF,vht); chEstLLTF = wlanLLTFChannelEstimate(demodLLTF,vht);
Extract the L-SIG field from the received PPDU and recover its information bits.
rxLSIG = rxPPDU(ind.LSIG(1):ind.LSIG(2),:); infoLSIG = wlanLSIGRecover(rxLSIG,chEstLLTF,nVar,cbw);
Inspect the L-SIG rate information and confirm that the sequence [1 1 0 1]
is received. This sequence corresponds to a 6 MHz data rate, which is used for all VHT transmissions.
rate = infoLSIG(1:4)'
rate = 1x4 int8 row vector
0 1 1 1
Extract the VHT-SIG-A and confirm that the CRC check passed.
rxVHTSIGA = rxPPDU(ind.VHTSIGA(1):ind.VHTSIGA(2),:);
[infoVHTSIGA,failCRC] = wlanVHTSIGARecover(rxVHTSIGA, ...
chEstLLTF,nVar,cbw);
failCRC
failCRC = logical
1
Extract and demodulate the VHT-LTF. Use the demodulated signal to estimate the channel coefficients needed to recover the VHT-SIG-B field.
rxVHTLTF = rxPPDU(ind.VHTLTF(1):ind.VHTLTF(2),:); demodVHTLTF = wlanVHTLTFDemodulate(rxVHTLTF,vht); chEstVHTLTF = wlanVHTLTFChannelEstimate(demodVHTLTF,vht);
Extract and recover the VHT-SIG-B.
rxVHTSIGB = rxPPDU(ind.VHTSIGB(1):ind.VHTSIGB(2),:); infoVHTSIGB = wlanVHTSIGBRecover(rxVHTSIGB,chEstVHTLTF,nVar,cbw);
Verify that the APEP length, contained in the first 19 bits of the VHT-SIG-B, corresponds to the specified length of 2000 bits.
pktLbits = infoVHTSIGB(1:19); pktLen = bit2int(double(pktLbits),19,false)*4
pktLen = 1676920