main content

delay profile and fluorescent lighting effects -凯发k8网页登录

this example demonstrates the impact of changing the tgac delay profile, and it shows how fluorescent lighting affects the time response of the channel.

delay profile effects

create vht configuration object. set the sample rate to 80 mhz.

cfgvht = wlanvhtconfig;
fs = 80e6;

generate random binary data and create a transmit waveform parameterized by the vht configuration object.

d = randi([0 1],8*cfgvht.psdulength,1);
testwaveform = wlanwaveformgenerator(d,cfgvht);

create a tgac channel object. set the delay profile to 'model-a', which corresponds to flat fading. disable large-scale fading effects.

tgacchan = wlantgacchannel('samplerate',fs, ...
    'channelbandwidth',cfgvht.channelbandwidth, ...
    'delayprofile','model-a', ...
    'largescalefadingeffect','none');

pass the transmitted waveform through the tgac channel.

rxmodela = tgacchan(testwaveform);

set the delay profile to model-c, which corresponds to a multipath channel with 14 distinct paths and a 30 ns rms delay spread. the maximum delay spread is 200 ns, which corresponds to a coherence bandwidth of 2.5 mhz.

release(tgacchan)
tgacchan.delayprofile = 'model-c';

pass the waveform through the model-c channel.

rxmodelc = tgacchan(testwaveform);

create a spectrum analyzer and use it to visualize the spectrum of the received signals.

sascope = spectrumanalyzer(samplerate=fs, ...
    showlegend=true,channelnames={'model-a','model-c'},...
    averagingmethod='exponential',forgettingfactor=0.99);
sascope([rxmodela rxmodelc])

as expected, the frequency response of the model-a signal is flat across the 80 mhz bandwidth. conversely, the model-c frequency response varies because its coherence bandwidth is much smaller than the channel bandwidth.

fluorescent effects

release the tgac channel, and set its delay profile to 'model-d'. disable the fluorescent lighting effect.

release(tgacchan)
tgacchan.delayprofile = 'model-d';
tgacchan.fluorescenteffect = false;

to better illustrate the doppler effects of fluorescent lighting, change the bandwidth and sample rate of the channel. generate a test waveform of ones.

tgacchan.channelbandwidth = 'cbw20';
fs = 20e6;
tgacchan.samplerate = fs;
testwaveform = ones(5e5,1);

to ensure repeatability, set the global random number generator to a fixed value.

rng(37)

pass the waveform through the tgac channel.

rxsig0 = tgacchan(testwaveform);

enable the fluorescent lighting effect. reset the random number generator, and pass the waveform through the channel.

release(tgacchan)
tgacchan.fluorescenteffect = true;
rng(37)
rxsig1 = tgacchan(testwaveform);

determine the time axis and channel filter delay.

t = ((1:size(rxsig0,1))'-1)/fs;
fdelay = tgacchan.info.channelfilterdelay;

plot the magnitude of the received signals while accounting for the channel filter delay.

plot(t(fdelay 1:end),[abs(rxsig0(fdelay 1:end)) abs(rxsig1(fdelay 1:end))])
xlabel('time (s)')
ylabel('magnitude (v)')
legend('fluorescent off','fluorescent on','location','best')

figure contains an axes object. the axes object with xlabel time (s), ylabel magnitude (v) contains 2 objects of type line. these objects represent fluorescent off, fluorescent on.

fluorescent lighting introduces a doppler component at twice the power line frequency (120 hz in the u.s.).

confirm that the peaks are separated by approximately 0.0083 s (inverse of 120 hz) by measuring distance between the second and third peaks.

[~,loc] = findpeaks(abs(rxsig1(1e5:4e5)));
peaktimes = loc/fs;
peakseparation = diff(peaktimes)
peakseparation = 0.0085
网站地图