main content

wlan channel models -凯发k8网页登录

this example demonstrates passing wlan s1g, vht, ht, and non-ht format waveforms through appropriate fading channel models. when simulating a wlan communications link, viable options for channel modeling include the tgah,tgn and tgac models from wlan toolbox™ and the additive white gaussian noise (awgn) and 802.11g models from communications toolbox™. in this example, it is sufficient to set the channel model sampling frequency to match the channel bandwidth because no front-end filtering is applied to the signal and the oversampling rate is 1.

in each section of this example, you:

  • create a waveform.

  • transmit it through a fading channel with noise added.

  • use a spectrum analyzer to display the waveform before and after it passes through the noisy fading channel.

pass s1g waveform through tgah siso channel

create a bit stream to use when generating the wlan s1g format waveform.

bits = randi([0 1],1000,1);

create an s1g configuration object, and then generate a 2 mhz s1g waveform. calculate the signal power.

s1g = wlans1gconfig(apeplength=1000);
prechs1g = wlanwaveformgenerator(bits,s1g);

pass the signal through a tgah siso channel with awgn noise (snr=10 db) and a receiver with a 9 db noise figure. recall that the channel model sampling frequency is equal to the bandwidth in this example. set property values by using name-value pairs.

create a tgah channel object. set the channel model sampling frequency and channel bandwidth, enable path loss and shadowing, and use the model-d delay profile.

cbw = s1g.channelbandwidth;
fs = 2e6; % channel model sampling frequency equals the channel bandwidth
tgahchan = wlantgahchannel('samplerate',fs,'channelbandwidth',cbw, ...
    'largescalefadingeffect','pathloss and shadowing', ...
    'delayprofile','model-d');

create an object with snr = 10 db. determine the signal power in watts, accounting for the tgah large scale fading pathloss.

prechsigpwr_db = 20*log10(mean(abs(prechs1g)));
sigpwr = 10^((prechsigpwr_db-tgahchan.info.pathloss)/10);
chnoise = comm.awgnchannel('noisemethod','signal to noise ratio (snr)',...
    'snr',10,'signalpower', sigpwr);

pass the s1g waveform through a siso tgah channel and add the awgn channel noise.

postchs1g = chnoise(tgahchan(prechs1g));

create another object to add receiver noise.

rxnoise = comm.awgnchannel('noisemethod','variance', ...
    'variancesource','input port');

pass the s1g waveform through the receiver. choose an appropriate noise variance, nvar, to set the receiver noise level. here, the receiver noise level is based on the noise variance for a receiver with a 9 db noise figure. nvar = ktbf, where k is boltzmann's constant, t is the ambient temperature of 290 k, b is the bandwidth, and f is the receiver noise figure.

nvar = 10^((-228.6   10*log10(290)   10*log10(fs)   9)/10);
rxs1g = rxnoise(postchs1g,nvar);

display a spectrum analyzer with before-channel and after-channel waveforms.

title = '2 mhz s1g waveform before and after tgah channel';
sascope = spectrumanalyzer(samplerate=fs,showlegend=true,...
    averagingmethod='exponential',forgettingfactor=0.99,title=title,...
    channelnames={'before','after'});
sascope([prechs1g,rxs1g])

path loss accounts for the roughly 50 db of separation between the waveform before and after it passes through the tgah channel. the path loss results from the default transmitter-to-receiver distance of 3 meters, and from shadowing effects. the signal level variation shows the frequency selectivity of the delay profile across the frequency spectrum.

pass vht waveform through tgac siso channel

create a bit stream to use when generating the wlan vht format waveform.

bits = randi([0 1],1000,1);

create a vht configuration object, and generate an 80 mhz vht waveform. calculate the signal power.

vht = wlanvhtconfig;
prechvht = wlanwaveformgenerator(bits,vht);

pass the signal through a tgac siso channel with awgn noise (snr=10 db) and a receiver with a 9 db noise figure. recall that the channel model sampling frequency is equal to the bandwidth in this example. set parameters using name,value pairs.

create a tgac channel object. set the channel model sampling frequency and channel bandwidth, enable path loss and shadowing, and use the model-d delay profile.

cbw = vht.channelbandwidth;
fs = 80e6; % channel model sampling frequency equals the channel bandwidth
tgacchan = wlantgacchannel('samplerate',fs,'channelbandwidth',cbw, ...
    'largescalefadingeffect','pathloss and shadowing', ...
    'delayprofile','model-d');

create an object with snr = 10 db. determine the signal power in watts, accounting for the tgac large scale fading pathloss.

prechsigpwr_db = 20*log10(mean(abs(prechvht)));
sigpwr = 10^((prechsigpwr_db-tgacchan.info.pathloss)/10);
chnoise = comm.awgnchannel('noisemethod','signal to noise ratio (snr)',...
    'snr',10,'signalpower', sigpwr);

pass the vht waveform through a siso tgac channel and add the awgn channel noise.

postchvht = chnoise(tgacchan(prechvht));

create another object to add receiver noise.

rxnoise = comm.awgnchannel('noisemethod','variance', ...
    'variancesource','input port');

pass the vht waveform through the receiver. choose an appropriate noise variance, nvar, to set the receiver noise level. here, the receiver noise level is based on the noise variance for a receiver with a 9 db noise figure. nvar = ktbf, where k is boltzmann's constant, t is the ambient temperature of 290 k, b is the bandwidth, and f is the receiver noise figure.

nvar = 10^((-228.6   10*log10(290)   10*log10(fs)   9)/10);
rxvht = rxnoise(postchvht,nvar);

display a spectrum analyzer with before-channel and after-channel waveforms.

title = '80 mhz vht waveform before and after tgac channel';
sascope = spectrumanalyzer(samplerate=fs,showlegend=true,...
    averagingmethod='exponential',forgettingfactor=0.99,title=title,...
    channelnames={'before','after'});
sascope([prechvht,rxvht])

path loss accounts for the roughly 50 to 60 db of separation between the waveform before and after it passes through the tgac channel. the path loss results from the default transmitter-to-receiver distance of 3 meters, and from shadowing effects. the signal level variation shows the frequency selectivity of the delay profile across the frequency spectrum.

pass ht waveform through tgn siso channel

create a bit stream to use when generating the wlan ht format waveform.

bits = randi([0 1],1000,1);

create an ht configuration object, and generate an ht waveform.

ht = wlanhtconfig;
prechht = wlanwaveformgenerator(bits,ht);

pass the signal through a tgn siso channel with awgn noise (snr=10 db) and a receiver with a 9 db noise figure. recall that the channel model sampling frequency is equal to the bandwidth in this example. set parameters using name,value pairs.

create a tgn channel object. set the channel model sampling frequency and channel bandwidth, enable path loss and shadowing, and use the model-f delay profile.

fs = 20e6; % channel model sampling frequency equals the channel bandwidth
tgnchan = wlantgnchannel('samplerate',fs,'largescalefadingeffect', ...
    'pathloss and shadowing','delayprofile','model-f');

pass the ht waveform through a tgn channel. use the function to add channel noise at an snr level of 10 db.

postchht = awgn(tgnchan(prechht),10,'measured');

create an object to add receiver noise.

rxnoise = comm.awgnchannel('noisemethod','variance', ...
    'variancesource','input port');

pass the ht waveform through the receiver. choose an appropriate noise variance, nvar, for setting the receiver noise level. here, the receiver noise is based on the noise variance for a receiver with a 9 db noise figure. nvar = ktbf, where k is boltzmann's constant, t is the ambient temperature of 290 k, b is the bandwidth, and f is the receiver noise figure.

nvar = 10^((-228.6   10*log10(290)   10*log10(fs)   9)/10);
rxht = rxnoise(postchht, nvar);

display a spectrum analyzer with before-channel and after-channel waveforms.

title = '20 mhz ht waveform before and after tgn channel';
sascope = spectrumanalyzer(samplerate=fs,showlegend=true,...
    averagingmethod='exponential',forgettingfactor=0.99,title=title,...
    channelnames={'before','after'});
sascope([prechht,postchht])

path loss accounts for the roughly 50 to 60 db of separation between the waveform before and after it passes through the tgn channel. the path loss results from the default transmitter-to-receiver distance of 3 meters, and from shadowing effects. the signal level variation shows the frequency selectivity of the delay profile across the frequency spectrum.

pass non-ht waveform through 802.11g channel

create a bit stream to use when generating the wlan non-ht format waveform.

bits = randi([0 1],1000,1);

create a non-ht configuration object, and generate a non-ht waveform.

nht = wlannonhtconfig;
prechnonht = wlanwaveformgenerator(bits,nht);

calculate free-space path loss for a transmitter-to-receiver separation distance of 3 meters. create an 802.11g channel object with a 3 hz maximum doppler shift and an rms path delay equal to two times the sample time. recall that the channel model sampling frequency is equal to the bandwidth in this example. create an awgn channel object.

dist = 3;
fc = 2.4e9;
pathloss = 10^(-log10(4*pi*dist*(fc/3e8)));
fs = 20e6; % channel model sampling frequency equals the channel bandwidth
maxdoppshift = 3;
trms = 2/fs;
ch802 = comm.rayleighchannel('samplerate',fs,'maximumdopplershift',maxdoppshift,'pathdelays',trms);

pass the non-ht waveform through an 802.11g channel. use the function to add channel noise at an snr level of 10 db.

postchnonht = awgn(ch802(prechnonht),10,'measured');

create an object to add receiver noise.

rxnoise = comm.awgnchannel('noisemethod','variance', ...
    'variancesource','input port');

pass the non-ht waveform through the receiver. choose an appropriate noise variance, nvar, for setting the receiver noise level. here, the receiver noise is based on the noise variance for a receiver with a 9 db noise figure. nvar = ktbf, where k is boltzmann's constant, t is the ambient temperature of 290 k, b is the bandwidth, and f is the receiver noise figure.

nvar = 10^((-228.6   10*log10(290)   10*log10(fs)   9)/10);
rxnonht = rxnoise(postchnonht, nvar)* pathloss;

display a spectrum analyzer with before-channel and after-channel waveforms.

title = '20 mhz non-ht waveform before and after 802.11g channel';
sascope = spectrumanalyzer(samplerate=fs,showlegend=true,...
    averagingmethod='exponential',forgettingfactor=0.99,title=title,...
    channelnames={'before','after'});
sascope([prechnonht,rxnonht])

free-space path loss accounts for the roughly 50 to 60 db of separation between the waveform before and after it passes through the 802.11g channel. the path loss results from the specified transmitter-to-receiver distance of 3 meters, and from shadowing effects. the signal level variation shows the frequency selectivity of the delay profile across the frequency spectrum.

pass vht waveform through tgac mimo channel

create a bit stream to use when generating the wlan vht format waveform.

bits = randi([0 1],1000,1);

create a multi-user vht configuration object, and generate a vht waveform. set the number of transmit antennas to four. set the number of space-time streams and the number of receive antennas to 3. because the number of transmit antennas is not equal to the number of space-time streams, the spatial mapping is not direct. set the spatial mapping to hadamard.

ntx = 4;
nsts = 3;
nrx = 3;
vht = wlanvhtconfig('numtransmitantennas',ntx, ...
    'numspacetimestreams',nsts,'spatialmapping','hadamard');
prechvht = wlanwaveformgenerator(bits,vht);

create tgac mimo channel and awgn channel objects. recall that the channel model sampling frequency is equal to the bandwidth in this example. disable large-scale fading effects.

cbw = vht.channelbandwidth;
fs = 80e6; % channel model sampling frequency equals the channel bandwidth
tgacchan = wlantgacchannel('samplerate',fs,'channelbandwidth',cbw,...
    'numtransmitantennas',ntx,'numreceiveantennas',nrx);
tgacchan.largescalefadingeffect = 'none';

pass the vht waveform through a tgac channel. use the function to add channel noise at an snr level of 10 db.

postchvht = awgn(tgacchan(prechvht),10,'measured');

create an object to add receiver noise.

rxnoise = comm.awgnchannel('noisemethod','variance', ...
    'variancesource','input port');

pass the multi-user vht waveform through a noisy tgac channel. choose an appropriate noise variance, nvar, for setting the awgn level. here, the awgn level is based on the noise variance for a receiver with a 9 db noise figure. nvar = ktbf, where k is boltzmann's constant, t is the ambient temperature of 290 k, b is the bandwidth, and f is the receiver noise figure.

nvar = 10^((-228.6   10*log10(290)   10*log10(fs)   9)/10);
rxvht = rxnoise(postchvht,nvar);

display a spectrum analyzer showing the multiple streams after the channel effects have been added.

title = '80 mhz vht 4x3 mimo waveform after tgac channel';
sascope = spectrumanalyzer(samplerate=fs,showlegend=true,...
    averagingmethod='exponential',forgettingfactor=0.99,title=title,...
    channelnames={'rx1','rx2','rx3'});
sascope(rxvht)

the overlaid signals show the tgac channel variation between the received streams.

references

[1] erceg, v., l. schumacher, p. kyritsi, et al. tgn channel models. version 4. ieee 802.11-03/940r4, may 2004.

[2] breit, g., h. sampath, s. vermani, et al. tgac channel model addendum. version 12. ieee 802.11-09/0308r12, march 2010.

see also

| | | |

related topics

网站地图