main content

basic vht data recovery -凯发k8网页登录

this example shows how to perform basic vht data recovery. it also shows how to recover vht data when the received signal has a carrier frequency offset. similar procedures can be used to recover data with the ht and non-ht formats.

basic data recovery

wlan toolbox™ provides functions to generate and recover ieee® 802.11ac™ standards-compliant waveforms. the data recovery process comprises these steps.

  1. generate a vht waveform

  2. pass the waveform through a channel

  3. extract the vht-ltf and demodulate

  4. estimate the channel by using the demodulated vht-ltf

  5. extract the data field

  6. recover the data by using the channel and noise variance estimates

the block diagram shows these steps, along with their corresponding commands.

create vht configuration object.

cfg = wlanvhtconfig;

create a vht transmit waveform by using the vht configuration object. set the data sequence to [1;0;1;1]. the waveform generator function repeats the data sequence to generate the specified number of packets.

txsig = wlanwaveformgenerator([1;0;1;1],cfg);

pass the received signal through an awgn channel.

rxsig = awgn(txsig,10);

determine the field indices of the waveform.

ind = wlanfieldindices(cfg);

extract the vht-ltf from the received signal.

rxvhtltf = rxsig(ind.vhtltf(1):ind.vhtltf(2),:);

demodulate the vht-ltf. estimate the channel response by using the demodulated signal.

demodvhtltf = wlanvhtltfdemodulate(rxvhtltf,cfg);
chest = wlanvhtltfchannelestimate(demodvhtltf,cfg);

extract the vht data field.

rxdata = rxsig(ind.vhtdata(1):ind.vhtdata(2),:);

recover the information bits by using the channel and noise variance estimates. confirm that the first 8 bits match two repetitions of the input data sequence of [1;0;1;1].

rxbits = wlanvhtdatarecover(rxdata,chest,0.1,cfg);
rxbits(1:8)
ans = 8x1 int8 column vector
   1
   0
   1
   1
   1
   0
   1
   1

data recovery with frequency correction

data recovery when a carrier frequency offset is present is accomplished by these steps.

  1. generate a vht waveform

  2. pass the waveform through a channel

  3. extract the l-stf and perform a coarse frequency offset estimate

  4. correct for the offset by using the coarse estimate

  5. extract the l-ltf and perform a fine frequency offset estimate

  6. correct for the offset by using the fine estimate

  7. extract the vht-ltf and demodulate

  8. estimate the channel by using the demodulated vht-ltf

  9. extract the data field

  10. recover the data by using the channel and noise variance estimates

the block diagram shows these steps, along with their corresponding commands.

set the channel bandwidth and sample rate.

cbw = 'cbw160';
fs = 160e6;

create a vht configuration object that supports a 2x2 mimo transmission.

cfg = wlanvhtconfig('channelbandwidth',cbw, ...
    'numtransmitantennas',2,'numspacetimestreams',2);

generate a vht waveform containing a random psdu.

txpsdu = randi([0 1],cfg.psdulength*8,1);
txsig = wlanwaveformgenerator(txpsdu,cfg);

create a 2x2 tgac channel.

tgacchan = wlantgacchannel('samplerate',fs,'channelbandwidth',cbw, ...
    'numtransmitantennas',2,'numreceiveantennas',2);

create a phase and frequency offset object.

pfoffset = comm.phasefrequencyoffset('samplerate',fs,'frequencyoffsetsource','input port');

pass the transmitted waveform through the noisy tgac channel.

rxsignonoise = tgacchan(txsig);
rxsig = awgn(rxsignonoise,15);

introduce a frequency offset of 500 hz to the received signal.

rxsigfreqoffset = pfoffset(rxsig,500);

find the start and stop indices for all component fields of the ppdu.

ind = wlanfieldindices(cfg);

extract the l-stf. estimate and correct for the carrier frequency offset.

rxlstf = rxsigfreqoffset(ind.lstf(1):ind.lstf(2),:);
foffset1 = wlancoarsecfoestimate(rxlstf,cbw);
rxsig1 = pfoffset(rxsigfreqoffset,-foffset1);

extract the l-ltf from the corrected signal. estimate and correct for the residual frequency offset.

rxlltf = rxsig1(ind.lltf(1):ind.lltf(2),:);
foffset2 = wlanfinecfoestimate(rxlltf,cbw);
rxsig2 = pfoffset(rxsig1,-foffset2);

extract and demodulate the vht-ltf. estimate the channel coefficients.

rxvhtltf = rxsig2(ind.vhtltf(1):ind.vhtltf(2),:);
demodvhtltf = wlanvhtltfdemodulate(rxvhtltf,cfg);
chest = wlanvhtltfchannelestimate(demodvhtltf,cfg);

extract the vht data field from the received and frequency-corrected ppdu. recover the data field.

rxdata = rxsig2(ind.vhtdata(1):ind.vhtdata(2),:);
rxpsdu = wlanvhtdatarecover(rxdata,chest,0.03,cfg);

calculate the number of bit errors in the received packet.

numerr = biterr(txpsdu,rxpsdu)
numerr = 2
网站地图