about the SampleRate of the comm.LTEMIMOChannel.

1 view (last 30 days)
Hi: When the SampleRate is large, the result is error. But when the SampleRate is small, the result is likely correct.What is wrong with the following code? what happened to the large SampleRate value?
numTx = 2;
numRx = 2;
SampleRate = 30.72e6; %????
numBits = 2048*2;
SNRdB = 0:20;
lenSNRdB = length(SNRdB);
bitErrors = zeros(1,lenSNRdB);
hErrorCalc = comm.ErrorRate;
hMod = comm.QPSKModulator(...
'BitInput',true,...
'SymbolMapping','Gray');
hDemod = comm.QPSKDemodulator(...
'SymbolMapping','Gray',...
'BitOutput',true);
hOSTBCEnc = comm.OSTBCEncoder(...
'NumTransmitAntennas',numTx);
hOSTBCCombine = comm.OSTBCCombiner (...
'NumTransmitAntennas', numTx,...
'NumReceiveAntennas', numRx);
% 3GPP Long Term Evolution (LTE) Release 10
chanMode = 'EPA 5Hz'; %EPA 5Hz | EVA 5Hz | EVA 70Hz | ETU 70Hz | ETU 300Hz
antconf = sprintf('%dx%d',numTx,numRx);%1x2 | 2x2 | 4x2 | 4x4
hLTEMIMOChan = comm.LTEMIMOChannel(...
'SampleRate', SampleRate, ... %????
'Profile', chanMode, ...
'AntennaConfiguration', antconf, ...
'CorrelationLevel', 'Low',... % Low | Medium | High
'RandomStream', 'mt19937ar with seed',...
'Seed', 100,...
'NormalizePathGains', false, ... %true | false
'NormalizeChannelOutputs', false, ... %true | false
'PathGainsOutputPort', true); %true | false
hAWGN = comm.AWGNChannel('NoiseMethod','Signal to noise ratio (SNR)');
for ii = 1:lenSNRdB;
iSNRdB = SNRdB(ii);
txData = randi([0 1],numBits,1);
modData = step(hMod, txData);
encData = step(hOSTBCEnc, modData);
%%用hLTEChan
reset(hLTEMIMOChan);
[LTEChanOut, pathGains] = step(hLTEMIMOChan, encData);
sigPow = var(LTEChanOut);
hAWGN.SNR = iSNRdB - 10*log10(numTx);%
% hAWGN.SNR = iSNRdB;%
hAWGN.SignalPower = sigPow;
rxSig = step(hAWGN,LTEChanOut);
chEst = squeeze(sum(pathGains,2));
combinedData = step(hOSTBCCombine, rxSig, chEst);
rxData = step(hDemod,combinedData);
reset(hErrorCalc);
BitError = step(hErrorCalc, rxData, txData);
bitErrors(ii) = BitError(1);
end
close all
figure
semilogy(SNRdB, bitErrors);
axis([SNRdB(1) SNRdB(end) 1e-5 0.5]), grid on
legend([sprintf('numTx = %d , numRx = %d,',numTx, numRx), 'OSTBC']);
xlabel('SNR, dB'); ylabel('Bit Error Rate');
title(['BER for QPSK modulation with', ...
sprintf('numTx = %d , numRx = %d,',numTx, numRx), 'OSTBC ',chanMode]);
scatterplot(combinedData)

Answers (0)

Tags

No tags entered yet.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!