|
|
@ -6,28 +6,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
recordedSignal=[];
|
|
|
|
recordedSignal=[];
|
|
|
|
|
|
|
|
|
|
|
|
Npackets = 3;
|
|
|
|
Npackets = 1;
|
|
|
|
SNR_values = linspace(12,16,4);
|
|
|
|
SNR_values = 25;
|
|
|
|
|
|
|
|
|
|
|
|
%% Choose RMC
|
|
|
|
%% Choose RMC
|
|
|
|
[waveform,rgrid,rmccFgOut] = lteRMCDLTool('R.9',[1;0;0;1]);
|
|
|
|
[waveform,rgrid,rmccFgOut] = lteRMCDLTool('R.9',[1;0;0;1]);
|
|
|
|
waveform = sum(waveform,2);
|
|
|
|
waveform = sum(waveform,2);
|
|
|
|
|
|
|
|
|
|
|
|
if ~isempty(recordedSignal)
|
|
|
|
if ~isempty(recordedSignal)
|
|
|
|
rmccFgOut = struct('NCellID',1,'CellRefP',1,'CFI',1,'NDLRB',50,'SamplingRate',3.84e6,'Nfft',256,'DuplexMode','FDD','CyclicPrefix','Normal');
|
|
|
|
rmccFgOut = struct('NCellID',1,'CellRefP',1,'CFI',1,'NDLRB',100,'DuplexMode','FDD','CyclicPrefix','Normal');
|
|
|
|
rmccFgOut.PDSCH.RNTI = 1234;
|
|
|
|
rmccFgOut.PDSCH.RNTI = 1234;
|
|
|
|
rmccFgOut.PDSCH.PRBSet = repmat(transpose(0:rmccFgOut.NDLRB-1),1,2);
|
|
|
|
rmccFgOut.PDSCH.PRBSet = repmat(transpose(0:rmccFgOut.NDLRB-1),1,2);
|
|
|
|
rmccFgOut.PDSCH.TxScheme = 'Port0';
|
|
|
|
rmccFgOut.PDSCH.TxScheme = 'Port0';
|
|
|
|
rmccFgOut.PDSCH.NLayers = 1;
|
|
|
|
rmccFgOut.PDSCH.NLayers = 1;
|
|
|
|
rmccFgOut.PDSCH.NTurboDecIts = 5;
|
|
|
|
rmccFgOut.PDSCH.NTurboDecIts = 5;
|
|
|
|
rmccFgOut.PDSCH.Modulation = {'64QAM'};
|
|
|
|
rmccFgOut.PDSCH.Modulation = {'64QAM'};
|
|
|
|
rmccFgOut.PDSCH.TrBlkSizes = [0 5992*ones(1,4) 0 5992*ones(1,4)];
|
|
|
|
trblklen=75376;
|
|
|
|
|
|
|
|
rmccFgOut.PDSCH.TrBlkSizes = trblklen*ones(10,1);
|
|
|
|
rmccFgOut.PDSCH.RV = 0;
|
|
|
|
rmccFgOut.PDSCH.RV = 0;
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
flen=rmccFgOut.SamplingRate/1000;
|
|
|
|
flen=rmccFgOut.SamplingRate/1000;
|
|
|
|
|
|
|
|
|
|
|
|
Nsf = 9;
|
|
|
|
Nsf = 10;
|
|
|
|
|
|
|
|
|
|
|
|
%% Setup Fading channel model
|
|
|
|
%% Setup Fading channel model
|
|
|
|
cfg.Seed = 8; % Random channel seed
|
|
|
|
cfg.Seed = 8; % Random channel seed
|
|
|
@ -78,8 +79,8 @@ for snr_idx=1:length(SNR_values)
|
|
|
|
%% Demodulate
|
|
|
|
%% Demodulate
|
|
|
|
frame_rx = lteOFDMDemodulate(rmccFgOut, rxWaveform);
|
|
|
|
frame_rx = lteOFDMDemodulate(rmccFgOut, rxWaveform);
|
|
|
|
|
|
|
|
|
|
|
|
for sf_idx=0:Nsf
|
|
|
|
%for sf_idx=0:Nsf-1
|
|
|
|
%sf_idx=9;
|
|
|
|
sf_idx=9;
|
|
|
|
subframe_rx=frame_rx(:,sf_idx*14+1:(sf_idx+1)*14);
|
|
|
|
subframe_rx=frame_rx(:,sf_idx*14+1:(sf_idx+1)*14);
|
|
|
|
rmccFgOut.NSubframe=sf_idx;
|
|
|
|
rmccFgOut.NSubframe=sf_idx;
|
|
|
|
rmccFgOut.TotSubframes=1;
|
|
|
|
rmccFgOut.TotSubframes=1;
|
|
|
@ -96,9 +97,9 @@ for snr_idx=1:length(SNR_values)
|
|
|
|
|
|
|
|
|
|
|
|
%% Same with srsLTE
|
|
|
|
%% Same with srsLTE
|
|
|
|
if (rmccFgOut.PDSCH.TrBlkSizes(sf_idx+1) > 0)
|
|
|
|
if (rmccFgOut.PDSCH.TrBlkSizes(sf_idx+1) > 0)
|
|
|
|
[dec2, data, pdschRx, pdschSymbols2, cws2, cb9, temp] = srslte_pdsch(rmccFgOut, rmccFgOut.PDSCH, ...
|
|
|
|
[dec2, data, pdschRx, pdschSymbols2, cws2] = srslte_pdsch(rmccFgOut, rmccFgOut.PDSCH, ...
|
|
|
|
rmccFgOut.PDSCH.TrBlkSizes(sf_idx+1), ...
|
|
|
|
rmccFgOut.PDSCH.TrBlkSizes(sf_idx+1), ...
|
|
|
|
subframe_rx);
|
|
|
|
subframe_rx, hest, nest);
|
|
|
|
else
|
|
|
|
else
|
|
|
|
dec2 = 1;
|
|
|
|
dec2 = 1;
|
|
|
|
end
|
|
|
|
end
|
|
|
@ -106,7 +107,7 @@ for snr_idx=1:length(SNR_values)
|
|
|
|
fprintf('Error in sf=%d\n',sf_idx);
|
|
|
|
fprintf('Error in sf=%d\n',sf_idx);
|
|
|
|
end
|
|
|
|
end
|
|
|
|
decoded_srslte(snr_idx) = decoded_srslte(snr_idx)+dec2;
|
|
|
|
decoded_srslte(snr_idx) = decoded_srslte(snr_idx)+dec2;
|
|
|
|
end
|
|
|
|
%end
|
|
|
|
|
|
|
|
|
|
|
|
if ~isempty(recordedSignal)
|
|
|
|
if ~isempty(recordedSignal)
|
|
|
|
recordedSignal = recordedSignal(flen*10+1:end);
|
|
|
|
recordedSignal = recordedSignal(flen*10+1:end);
|
|
|
|