此示例演示了改变TGAC延迟配置文件的影响,并显示荧光灯如何影响通道的时间响应。
Create VHT configuration object. Set the sample rate to 80 MHz.
cfgvht = wlanvhtconfig;FS = 80E6;
生成随机二进制数据,并通过VHT配置对象创建参数化的发送波形。
d = randi([0 1],8*cfgVHT.PSDULength,1); testWaveform = wlanWaveformGenerator(d,cfgVHT);
创建TGAC通道对象。将延迟配置文件设置为'型号-A'
,这对应于扁平衰落。禁用大规模衰落效果。
TGACCHAN = WLANTGACCHANNEL('采样率',fs,......'信道带宽',cfgvht.channelbandwidth,......'DelayProfile'那'型号-A'那......'LargescalefadingEffect'那'没有');
Pass the transmitted waveform through the TGac channel.
rxmodela = tgacchan(testwaveform);
将延迟配置文件设置为Model-C,其对应于具有14个不同路径的多径通道,并且30ns rms延迟扩展。最大延迟扩展为200 ns,其对应于2.5MHz的相干带宽。
释放(TGACCHAN)TGACCHAN.DELAYPROFILE ='Model-C';
Pass the waveform through the model-C channel.
rxmodelc = tgacchan(testwaveform);
创建频谱分析仪并使用它来可视化接收信号的频谱。
saScope = dsp.SpectrumAnalyzer('采样率',fs,......'ShowLegend',真的,“ChannelNames”那{'型号-A'那'Model-C'},......'verigesmethod'那'指数'那'忘记事实',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.
Release the TGac channel, and set its delay profile to'Model-D'
。禁用荧光灯效果。
释放(TGACCHAN)TGACCHAN.DELAYPROFILE ='Model-D';tgacchan.fluorenteseffect = false;
为了更好地说明荧光照明的多普勒效应,改变通道的带宽和采样率。生成一个测试波形。
TGACCHAN.CHANNELBANDWIDTH ='CBW20';fs = 20e6;TGACCHAN.SAMPLEDE = FS;testwaveform =α(5e5,1);
为确保重复性,将全局随机数生成器设置为固定值。
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.
释放(TGACCHAN)TGACCHAN.FLUORESTESEFFECT = TRUE;RNG(37)RXSIG1 = TGACCHAN(TESTWAVEFORM);
确定时间轴和通道过滤器延迟。
t =((1:size(rxsig0,1))' - 1)/ fs;fdelay = tgacchan.info.channelfilterdelay;
绘制接收信号的大小,同时考虑通道滤波器延迟。
plot(t(fDelay+1:end),[abs(rxSig0(fDelay+1:end)) abs(rxSig1(fDelay+1:end))]) xlabel('时间(s)'的)ylabel('幅度(v)') 传奇('荧光ood'那'荧光on'那'地点'那'最好的'的)
Fluorescent lighting introduces a Doppler component at twice the power line frequency (120 Hz in the U.S.).
通过测量第二和第三峰之间的距离,确认峰值由大约0.0083秒(逆120Hz的逆)分开。
[〜,loc] = findpeaks(abs(rxsig1(1e5:4e5))));peaktimes = loc / fs;peakseparation = diff(peaktips)
peakSeparation = 0.0085