-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPassVHT_TGac_SISO.m
24 lines (22 loc) · 1.06 KB
/
PassVHT_TGac_SISO.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
bits = randi([0 1],1000,1);
vht = wlanVHTConfig;
preChVHT = wlanWaveformGenerator(bits,vht);
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');
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);
postChVHT = chNoise(tgacChan(preChVHT));
rxNoise = comm.AWGNChannel('NoiseMethod','Variance', ...
'VarianceSource','Input port');
nVar = 10^((-228.6 + 10*log10(290) + 10*log10(fs) + 9)/10);
rxVHT = rxNoise(postChVHT,nVar);
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])