HE/channelSounding.m
2024-03-30 16:35:40 +08:00

29 lines
1000 B
Matlab
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

function txNDP = channelSounding(cfg)
% 产生NDP
guardInterval = 0.8;% Guard interval in Microseconds
cfgNDP = wlanHESUConfig('APEPLength',0,'GuardInterval',guardInterval); % No data in an NDP
cfgNDP.ChannelBandwidth = cfg.ChannelBandwidth;
cfgNDP.NumTransmitAntennas = cfg.numTx;
cfgNDP.NumSpaceTimeStreams = cfg.numTx;
txNDP = wlanWaveformGenerator([],cfgNDP);
% 加入PN序列正交序列重复三次左右
soundingSeqMod_1 = zadoffChuSeq(29,255);
soundingSeqMod_2 = zadoffChuSeq(47,255);
% Concatenate multiple sequences to sound the channel periodically.
numSeq = 20; % Number of transmitted sequences in a WSS period
if cfg.numTx == 1
soundingSeqMod = [soundingSeqMod_1];
txSignal = repmat(soundingSeqMod,numSeq,1);
else
soundingSeqMod = [soundingSeqMod_1, soundingSeqMod_2];
txSignal = repmat(soundingSeqMod,numSeq,1);
end
% with 50 sample padding.
% txNDP = [txNDP; zeros(50,size(txNDP,2))];
txNDP = [txNDP; txSignal; zeros(50,size(txNDP,2))];
end