LTE System Toolbox
This example demonstrates how to measure the Physical Downlink Shared Channel (PDSCH) throughput performance using the LTE System Toolbox™ under conformance test conditions as defined in TS36.101, Section 188.8.131.52.2 [ 1 ]: two codewords, Closed Loop Spatial Multiplexing (CLSM), two transmit and two receive antennas with low correlation and an ETU70 channel.
|On this page…|
This example implements wideband Precoder Matrix Indication (PMI) feedback to simulate the Closed Loop Spatial Multiplexing (CLSM) MIMO operation. TS36.101, Table 184.108.40.206.2-2 [ 1 ] defines a required throughput of at least 70% of the maximum given an SNR of 14.3 dB. A total of 8 Hybrid Automatic Repeat reQuest (HARQ) processes are used with a maximum of 4 retransmissions permitted.
Working on a subframe by subframe basis when simulating at a particular SNR, a populated resource grid is generated and OFDM modulated to create a transmit waveform. The generated waveform is passed through a noisy Extended Typical Urban (ETU) channel. Channel estimation, equalization, demodulation and decoding are performed at receiver. The throughput performance of the PDSCH is determined using the block CRC result at the output of the channel decoder.
The example is executed for a simulation length of 1 frame at an SNR of 14.3 dB. A large number of NFrames should be used to produce meaningful throughput results. SNRIn can be an array of values or a scalar.
NFrames = 1; % Number of frames SNRIn = 14.3; % SNR range rng('default'); % Default random number generator seed
eNodeB settings are specified in a structure enb. This includes a substructure PDSCH to configure the PDSCH according to the conformance test requirements.
In this example a closed loop spatial multiplexing transmission scheme is used. The User Equipment (UE) provides feedback for the entire downlink system bandwidth using wideband Precoder Matrix Indicator (PMI) feedback. These parameters are set in the PDSCH configuration structure PDSCH.
The number of PDSCH codewords is controlled by the parameter ncw. In this example two codewords are used.
A power adjustment factor Rho is required as part of the conformance test. This scales the power of the PDSCH when using multiple transmit antennas to provide the receiver with the same energy as when using a single antenna transmission scheme. In this test two transmit antennas are used so the power is reduced by 3 dB as defined in TS36.101, Table 220.127.116.11.2-1 [ 1 ].
% eNodeB configuration enb = struct; % Create eNodeB config structure enb.TotSubframes = 1; % Total subframes to generate enb.RC = 'R.11'; % RMC number ncw = 2; % Number of PDSCH codewords % PDSCH configuration enb.PDSCH.TxScheme = 'SpatialMux'; % Transmission scheme enb.PDSCH.RNTI = 1; % 16-bit UE specific mask enb.PDSCH.Rho = -3; % PDSCH RE power adjustment factor enb.PDSCH.CSI = 'On'; % CSI scaling of soft bits enb.PDSCH.PMIMode = 'Wideband'; % Wideband PMI mode enb.PDSCH.CodebookSubset = '110000'; % Codebook subset restriction
Set the PMI delay for the closed-loop spatial multiplexing. This is the delay between a PMI being passed from UE to eNodeB as defined in TS36.101, Table 18.104.22.168.2-1 [ 1 ].
pmiDelay = 8;
The structure, cfg, contains the channel model configuration parameters.
cfg.Seed = 10; % Random channel seed cfg.NRxAnts = 2; % 2 receive antennas cfg.DelayProfile = 'ETU'; % Delay profile cfg.DopplerFreq = 70; % Doppler frequency cfg.MIMOCorrelation = 'Low'; % Multi-antenna correlation cfg.NTerms = 16; % Oscillators used in fading model cfg.ModelType = 'GMEDS'; % Rayleigh fading model type cfg.InitPhase = 'Random'; % Random initial phases cfg.NormalizePathGains = 'On'; % Normalize delay profile power cfg.NormalizeTxAnts = 'On'; % Normalize for transmit antennas
The channel estimator is configured with a structure cec. The variable perfectChanEstimator controls channel estimator behavior. Valid values are true or false. When set to true a perfect channel estimator is used otherwise an imperfect estimate of the channel is used, based on the values of received pilot signals.
% Configure channel estimator cec.PilotAverage = 'UserDefined'; % Type of pilot symbol averaging cec.FreqWindow = 1; % Frequency window size in REs cec.TimeWindow = 31; % Time window size in REs cec.InterpType = 'Cubic'; % 2D interpolation type cec.InterpWindow = 'Centered'; % Interpolation window type cec.InterpWinSize = 1; % Interpolation window size % Channel estimator behaviour perfectChanEstimator = false;
A downlink Reference Measurement Channel (RMC) configuration structure, rmc, is created using lteRMCDLlteRMCDL for test model R.11. The RMC configuration contained in rmc is used by lteRMCDLToollteRMCDLTool to generate an OFDM modulated waveform.
% Generate RMC configuration structure for R.11 rmc = lteRMCDL(enb, ncw); % Redundancy version sequence for each codeword and transport block sizes % for each subframe within a frame are taken from this structure rvSequence = rmc.PDSCH.RVSeq; trBlkSizes = rmc.PDSCH.TrBlkSizes;
This example models the implementation of HARQ retransmission scheme. The HARQ table stores the index of each HARQ processes to use. This is generated for 8-HARQ processes using the helper function hHARQTable.mhHARQTable.m.
harqTable = hHARQTable();
ofdmInfo = lteOFDMInfo(rmc); cfg.SamplingRate = ofdmInfo.SamplingRate;
The conformance test may be carried out over a number of SNR points. To determine the throughput at each SNR point, the PDSCH data is analyzed on a subframe by subframe basis using the following steps:
Update Current HARQ Process. The HARQ process either carries new transport data or a retransmission of previously sent transport data depending upon the Acknowledgment (ACK) or Negative Acknowledgment (NACK) based on CRC results. All this is handled by the HARQ scheduler, hHARQScheduling.mhHARQScheduling.m. The PDSCH data is updated based on the HARQ state.
Set PMI. A PMI is taken sequentially from a set of PMIs, txPMIs, each subframe and used by the eNodeB to select a precoding matrix. When a PMI is used by the eNodeB for a transmission it is replaced with a PMI selected by the UE. This PMI is then used to select a precoding matrix after pmiDelay subframes. Initially a set of pmiDelay random PMIs is used.
Noisy Channel Modeling. The waveform is passed through a fading channel and AWGN noise added. The noise power is normalized to take account of the sampling rate.
Perform Synchronization and OFDM Demodulation. The received symbols are offset to account for a combination of implementation delay and channel delay spread. The symbols are then OFDM demodulated.
Perform Channel Estimation. The channel response and noise are estimated using either a perfect or imperfect channel estimator. These estimates are used to aid the soft decoding of the PDSCH.
Decode the PDSCH. The recovered PDSCH symbols for all transmit and receive antenna pairs, along with a noise estimate, are demodulated and descrambled by ltePDSCHDecodeltePDSCHDecode to obtain an estimate of the received codeword.
Decode the DownLink Shared Channel (DL-SCH) and Store the Block CRC Error for a HARQ Process. The vector of decoded soft bits is passed to lteDLSCHDecodelteDLSCHDecode; this decodes the codeword and returns the block CRC error used to determine the throughput of the system. The contents of the new soft buffer, harqProc(harqIdx).decState, is available at the output of this function to be used for the next subframe.
Update PMI. A PMI is selected and feedback to the eNodeB for future use.
% The number of transmit antennas P is obtained from the resource grid % dimensions. Dims is M-by-N-by-P where M is the number of subcarriers, N % is the number of symbols and P is the number of transmit antennas. Dims = lteDLResourceGridSize(rmc); P = Dims(3); % Initialize variables used in the simulation and analysis resultIndex = 1; % Initialize SNR test point counter index offsets = 0; % Initialize frame offset value % Store results for each SNR point and each subframe containing data for % the whole simulation nDataTBS = sum(trBlkSizes(:)~=0)*NFrames; totalBLKCRC = zeros(numel(SNRIn), nDataTBS); bitThroughput = zeros(numel(SNRIn), nDataTBS); for SNRdB = SNRIn fprintf('\nSimulating at %gdB SNR for %d Frame(s)\n' ,SNRdB, NFrames); % Initialize result store for SNR point tested blkCRC = zeros(nDataTBS/ncw, ncw); % Intermediate block CRC bitTput = zeros(nDataTBS/ncw, ncw); % Intermediate throughput dataSubframeIndex = 1; % Initialize state of all HARQ processes harqprocess = hDownlinkSpatialMuxNewHARQProcess(rmc); harqProcesses = repmat(harqprocess, 1, max(harqTable)); % Use random PMIs for the first 'pmiDelay' subframes until feedback is % available from the UE pmidims = ltePMIInfo(rmc,rmc.PDSCH); txPMIs = randi([0 pmidims.MaxPMI], pmidims.NSubbands, pmiDelay); for subframeNo = 0:(NFrames*10-1) % Update subframe number rmc.NSubframe = subframeNo; % Get HARQ index for given subframe from HARQ index table harqIdx = harqTable(mod(subframeNo, length(harqTable))+1); % Update current HARQ process harqProcesses(harqIdx) = hHARQScheduling( ... harqProcesses(harqIdx), subframeNo, rvSequence); % Update the PDSCH transmission config with HARQ process state rmc.PDSCH = harqProcesses(harqIdx).txConfig; data = harqProcesses(harqIdx).data; % Set the PMI to the appropriate value in the delay queue pmiIdx = mod(subframeNo, pmiDelay); % PMI index in delay queue rmc.PDSCH.PMISet = txPMIs(:, pmiIdx+1); % Set PMI % Create transmit waveform and add 25 sample padding txWaveform = [lteRMCDLTool(rmc, data); zeros(25, P)]; % The initialization time for channel modeling is set each subframe % to simulate a continuously varying channel cfg.InitTime = subframeNo/1000; % Pass data through channel model rxWaveform = lteFadingChannel(cfg, txWaveform); % Calculate noise gain including compensation for downlink power % allocation SNR = 10^((SNRdB-rmc.PDSCH.Rho)/20); % Normalize noise power to take account of sampling rate, which is % a function of the IFFT size used in OFDM modulation, and the % number of antennas N0 = 1/(sqrt(2.0*rmc.CellRefP*double(ofdmInfo.Nfft))*SNR); % Create additive white Gaussian noise noise = N0*complex(randn(size(rxWaveform)), ... randn(size(rxWaveform))); % Add AWGN to the received time domain waveform rxWaveform = rxWaveform + noise; % Once every frame, on subframe 0, calculate a new synchronization % offset if (mod(subframeNo,10) == 0) offset = lteDLFrameOffset(rmc, rxWaveform); if (offset > 25) offset = offsets(end); end offsets = [offsets offset]; %#ok end % Synchronize the received waveform rxWaveform = rxWaveform(1+offset:end, :); % Perform OFDM demodulation on the received data to recreate the % resource grid rxSubframe = lteOFDMDemodulate(rmc, rxWaveform); % Channel estimation if(perfectChanEstimator) estChannelGrid = lteDLPerfectChannelEstimate(rmc, cfg, offset); %#ok n = lteOFDMDemodulate(rmc, noise(1+offset:end ,:)); noiseEst = var(n(:)); else [estChannelGrid, noiseEst] = lteDLChannelEstimate( ... rmc, cec, rxSubframe); end % Decode the PDSCH. The received subframe is scaled to counteract % any attenuation applied at the transmitter. rxEncodedBits = ltePDSCHDecode(rmc, rmc.PDSCH,... rxSubframe*(10^(-rmc.PDSCH.Rho/20)), ... estChannelGrid, noiseEst); % Extract the current subframe transport block size(s) TBSs = trBlkSizes(:, mod(subframeNo, 10)+1).'; % Decode the DL-SCH [decbits, harqProcesses(harqIdx).blkerr, ... harqProcesses(harqIdx).decState] = lteDLSCHDecode( ... rmc, rmc.PDSCH, TBSs, rxEncodedBits, ... harqProcesses(harqIdx).decState); % Store block CRC and throughput results for subframes containing % transport data, ignore subframes containing no data if(any(TBSs ~= 0)) blkCRC(dataSubframeIndex,:) = harqProcesses(harqIdx).blkerr; bitTput(dataSubframeIndex,:) = ... TBSs.*(1-harqProcesses(harqIdx).blkerr); dataSubframeIndex = dataSubframeIndex + 1; end % Provide PMI feedback to the eNodeB PMI = ltePMISelect(rmc, rmc.PDSCH, estChannelGrid, noiseEst); txPMIs(:, pmiIdx+1) = PMI; end % Record the block CRC error and bit throughput for the total number of % frames simulated at an SNR point totalBLKCRC(resultIndex,:) = blkCRC(:); bitThroughput(resultIndex,:) = bitTput(:); resultIndex = resultIndex + 1; % Display the results dynamically in the command window fprintf([['Throughput(Mbps) for ', num2str(NFrames) ' Frame(s) '],... '= %.4f\n'], mean(bitTput(:))* (nDataTBS/(NFrames*10))/1e3); fprintf(['Throughput(%%) for ', num2str(NFrames) ' Frame(s) = %.4f\n'],... 100*(1-mean(blkCRC(:)))); end
Simulating at 14.3dB SNR for 1 Frame(s) Throughput(Mbps) for 1 Frame(s) = 20.7360 Throughput(%) for 1 Frame(s) = 88.8889
The throughput results for the simulation are displayed in the MATLAB® command window after each SNR point is completed, and are also captured in totalBLKCRC and bitThroughput. totalBLKCRC is a matrix where each row contains the results of decoding the CRC for a particular SNR. Each column contains the CRC result for a transport block containing PDSCH data at an SNR. bitThroughput is a matrix where each row contains the bit throughput per subframe for a particular SNR. Each column contains the throughput result for a transport block containing PDSCH data at an SNR.
This example uses the helper functions:
3GPP TS 36.101