Release 14 V2X Sidelink PSSCH Throughput
This example demonstrates how to measure the Physical Sidelink Shared Channel (PSSCH) throughput performance in frequency-selective fading and Additive White Gaussian Noise (AWGN) using LTE System Toolbox™.
3GPP Release 14 introduced the support for LTE V2X (Vehicle-to-everything) to enable connected vehicular services with the aim of providing a safer, cleaner, faster and more efficient transportation. V2X offers several modes of operation including Vehicle-to-Vehicle (V2V), Vehicle-to-Infrastructure (V2I) and Vehicle-to-Pedestrian (V2P) direct communication without necessarily relying on network involvement for scheduling. Some of the distinguishing aspects of V2X over the normal device-to-device sidelink are:
- Low latency and high reliability requirements
- Large Doppler shift due to high relative speeds
- Very large number of nodes and high node densities
- Challenges to synchronization especially when out-of-coverage
This example measures Release 14 V2X sidelink shared channel throughput for a number of SNR points. For information on how to model Release 12 sidelink, check the following example: Release 12 Sidelink PSCCH and PSSCH Throughput.
For each of the considered SNR points, operating on a subframe by subframe basis:
- A populated resource grid is generated and OFDM modulated to create the waveform to transmit.
- The generated waveform is passed through a noisy fading channel.
- Receiver operations (channel estimation, equalization, demodulation and decoding) are performed.
- The throughput performance of the PSSCH is determined using the block CRC result at the output of the channel decoder.
The example is executed for a simulation length of 4 frames for a number of SNR points. A larger number of NFrames should be used to produce meaningful throughput results. SNRIn can be an array of values or a scalar.
% Set the number of frames to simulate NFrames = 4; % Set a range of SNR points to cover both high and low BLER operating % conditions SNRIn = [-5 0 5];
A set of top-level parameters is initially specified, these include the bandwidth, the cyclic prefix, the modulation scheme and the allocated set of resource blocks. The baseline configuration is taken from the "Reference measurement channel for transmitter characteristics" as defined by TS 36.101 Table A.8.3-1 [ 2 ]. To simulate a more realistic V2X transmission, multiple HARQ processes and HARQ retransmissions have been introduced in this example. The data rate is defined in terms of the subframe gap sfGap and transmission time interval tti.
sfGap = 8; % Time in subframes between initial and retransmission tti = 4; % Time in subframes between different HARQ processes if tti > sfGap error('tti cannot be greater than sfGap'); end % Number of allocated resource blocks (NPRB) and Transport Block Size (TBS) % as given by TS 36.101 Table A.8.3-1 NPRB = 48; % Number of allocated resource blocks (NPRB) TBS = 3496; % The transport block size % Define the starting RB for the resource allocations. The initial and % subsequent transmission can have different allocations rbStart = [0 0]; % Define the UE configuration parameters ueConfig = struct('SidelinkMode','V2X'); % Release 14 V2X mode ueConfig.NSLRB = 50; % 10MHz bandwidth ueConfig.DuplexMode = 'FDD'; % Duplex mode ueConfig.CyclicPrefixSL = 'Normal'; % Cyclic prefix length ueConfig.NTurboDecIts = 5; % Turbo decoder iterations ueConfig.Modulation = 'QPSK'; % Symbol modulation ueConfig.RNTI = 1; % RNTI value
Propagation Channel Configuration
The structure channel contains the channel model configuration parameters.
channel = struct; % Channel config structure channel.Seed = 6; % Channel seed channel.NRxAnts = 2; % Number of receive antennas channel.DelayProfile ='EVA'; % Delay profile channel.DopplerFreq = 500; % Doppler frequency in Hz channel.MIMOCorrelation = 'Low'; % Multi-antenna correlation channel.NTerms = 16; % Oscillators used in fading model channel.ModelType = 'GMEDS'; % Rayleigh fading model type channel.InitPhase = 'Random'; % Random initial phases channel.NormalizePathGains = 'On'; % Normalize delay profile power channel.NormalizeTxAnts = 'On'; % Normalize for transmit antennas % The channel sampling rate depends on the FFT size used in the OFDM % modulator. This can be obtained using the function lteSLSCFDMAInfo. ofdmInfo = lteSLSCFDMAInfo(ueConfig); channel.SamplingRate = ofdmInfo.SamplingRate;
Channel Estimator Configuration
Define the channel estimator configuration structure. Note that depending on the channel delay profile and Doppler frequency, the operating SNR, PSSCH modulation order and the number of allocated resource blocks, different channel estimation parameters may give better performance for the PSSCH.
cec = struct; % Channel estimation config structure cec.PilotAverage = 'UserDefined'; % Type of pilot symbol averaging cec.FreqWindow = 41; % Frequency window size cec.TimeWindow = 27; % Time window size cec.InterpType = 'Cubic'; % 2D interpolation type
Display Simulation Information
The variable displaySimulationInformation controls the display of simulation information such as the HARQ process ID used and the resource allocation plot for each subframe. For long simulations, it is recommended to turn off the display as it increases simulation time
displaySimulationInformation = true;
Display V2X Sidelink Communication Resource Pool
In order to illustrate the V2X resource pools, use the class V2XSidelinkResourcePool. Transmission and reception opportunities for sidelink direct communications are associated with a set of periodically occurring time-domain periods known as resource pools. A UE can be configured with multiple messages and therefore multiple resource pools for transmission and reception. A single resource pool contains both the shared and control subframe and resource pools and a specific transmission is defined by a combination of semi-static RRC parameters with dynamic DCI/SCI parameters. The PSCCH associated with a PSSCH is sent in the same subframe, on either adjacent or non-adjacent PRB. The method period.displayPeriod is called which creates a plot showing the locations of the control resource pool (dark blue) and shared resource pool (yellow) within the resource Pool.
resourcePool = V2XSidelinkResourcePool; resourcePool.Config.NSLRB = ueConfig.NSLRB; resourcePool.Config.DuplexMode = ueConfig.DuplexMode; resourcePool.displayPeriod; drawnow;
To determine the throughput at each SNR point, the subframe by subframe PSSCH processing chain includes:
- Updating configuration for current HARQ process - The UE either carries new transport data or a retransmission of previously sent PSSCH transport data with a different redundancy version. All this is handled by the HARQ scheduler. The HARQ buffer decState stores the decoder state for soft combining.
- Plot the allocated resources - The resource allocation for the first HARQ process is plotted if the displaySimulationInformation flag is enabled. All HARQ processes have the same PSSCH (orange) and PSCCH (green) resource block allocation. The PSSCH and PSCCH can be transmitted on adjacent or non-adjacent resource blocks.
- Creating Transmit Waveform - Pass the data generated by the UE to the physical layer processing stage to produce an SC-FDMA modulated waveform, containing the physical channels and signals.
- Noisy Channel Modeling - Pass the waveform through a fading channel and add noise (AWGN).
- Performing Synchronization and SC-FDMA Demodulation - Offset the received symbols to account for a combination of implementation delay and channel delay spread. SC-FDMA demodulate the symbols.
- Performing Channel Estimation - Estimate the channel response and noise level. Use these estimates to decode the PSSCH.
- Decoding the PSSCH - Obtain an estimate of the received codeword using ltePSSCHDecode to demodulate and descramble the recovered PSSCH symbols for all transmit and receive antenna pairs.
- Decoding the Sidelink Shared Channel (SL-SCH) and Storing the Block CRC Error for a UE - Pass the vector of decoded soft bits to lteSLSCHDecode, which decodes the codeword and returns the block CRC error used to determine the throughput of the system. The contents of the new soft buffer, harqProcesses(harqID).decState, is available at the output of this function to be used when decoding the next subframe.
% Initialize variables used in the simulation and analysis % Array to store the maximum throughput for all SNR points maxThroughput = zeros(length(SNRIn),1); % Array to store the simulation throughput for all SNR points simThroughput = zeros(length(SNRIn),1); % Get the number of HARQ processes required nHARQProcesses = floor(sfGap/tti); % Calculate the HARQ ID sequence for each of the transmitting subframes harqProcessSequence = zeros(1,NFrames*10); for h = 1:nHARQProcesses harqProcessSequence(1+tti*(h-1):sfGap:NFrames*10) = h; end % Create the partial SCI message with the parameters that have fixed values % for the simulation. Other parameters that have variable values will be % set further down in the simulation loop sciMessage = struct('SCIFormat','Format1'); sciMessage.TimeGap = sfGap; % Set the PSSCH MCS according to the TBS and modulation scheme [itbs,modn] = lteMCS(0:28,'PUSCH'); itbs = itbs(strcmpi(modn,ueConfig.Modulation)); % Filter valid ITBSs sciMessage.ModCoding = find(lteTBS(NPRB,itbs)==TBS,1,'first') - 1; % Create new figure for displaying resource allocation, if required if displaySimulationInformation figure; end for snrIdx = 1:numel(SNRIn) % Set the random number generator seed depending on the loop variable % to ensure independent random streams rng(snrIdx); % Initialize the state of all HARQ buffers harqProcess = struct('RVIdx',1,'data',,'decState',); harqProcesses(1:nHARQProcesses) = harqProcess; RVSeq = [0 2]; % RV for initial transmission and retransmission % Set up variables for the main loop lastOffset = 0; % Initialize overall frame timing offset frameOffset = 0; % Initialize frame timing offset bitTput = ; % Number of successfully received bits per subframe txedTrBlkSizes = ; % Number of transmitted bits per subframe % Main for loop: for all subframes for subframeNo = 0:(NFrames*10-1) harqID = harqProcessSequence(subframeNo+1); if harqID == 0 % If there is no HARQ process transmitting in the current % subframe, continue to the next continue end % Update current HARQ process with new transport data and reset the % receive buffer if it is the initial transmission. The PSSCH is % transmitted twice with a gap of 'sfGap' subframes irrespective of % the success of the first transmission if harqProcesses(harqID).RVIdx == 1 harqProcesses(harqID).data = randi([0 1], TBS, 1); harqProcesses(harqID).decState = ; end % Set the RV ueConfig.RV = RVSeq(harqProcesses(harqID).RVIdx); % Set the subframe number ueConfig.NSubframePSSCH = subframeNo; % Display run time information if displaySimulationInformation disp(' '); disp(['Subframe: ' num2str(subframeNo) '. HARQ process index: ' num2str(harqID) '. Redundancy version: ' num2str(ueConfig.RV)]); end % Channel time for the current subframe channel.InitTime = subframeNo/1000; % create an empty resource grid slgrid = lteSLResourceGrid(ueConfig); % Generate SCI for PSSCH RB allocations. The RIV is calculated % according to TS 36.213 Section 22.214.171.124C for the configuration % given in TS 36.101 Table A.8.2-1 (NSLRB = 50, 48 allocated % resource blocks) and the default resource pool configuration used % in this example (numSubchannel_r14 = 10, sizeSubchannel_r14 = 5, % startRB_Subchannel_r14 = 0, adjacencyPSCCH_PSSCH_r14 = 'On') sciMessage.RIV = 19; % Create the SCI and message bits sciConfig = ueConfig; sciConfig.PSSCHNSubchannels = resourcePool.Config.numSubchannel_r14; [sciMessage, sciBits] = lteSCI(sciConfig,sciMessage); % NXID is the 16 bit CRC associated with the PSCCH SCI grant and is % typically obtained from the decoded SCI. Since this example do % not perform SCI decoding, we get this value from the SCI encoding % stage and use the value for the shared channel functions in the % transmitter and receiver [~,crc] = lteSCIEncode(sciConfig, sciBits); ueConfig.NXID = crc; % Create the PRBSet according to the PRB start index and % number of allocated RBs (NPRB) and PSCCH adjacency startPSSCHOffset = 0; if strcmpi(resourcePool.Config.adjacencyPSCCH_PSSCH_r14,'On') startPSSCHOffset = 2; end startingRB = rbStart(harqProcesses(harqID).RVIdx); prbset = (startingRB + startPSSCHOffset + (0:NPRB-1))'; % Display the subframes and resource blocks for transmission. Note % that the allocations are the same for all HARQ processes and that % the plot does not show the subframe offset for HARQ processes % other than 1. if (displaySimulationInformation) && (harqID==1) % Specify the additional parameters required for the resource % pool display sciMessage.FirstSubchannelIdx = 0; sciMessage.SLIndex = 0; resourcePool.Config.startRB_Subchannel_r14 = startingRB; resourcePool.displayPeriod(sciMessage,10); drawnow; end % Calculate the PSSCH resource indices ueConfig.PRBSet = prbset; [psschIndices,psschinfo] = ltePSSCHIndices(ueConfig); % SL-SCH and PSSCH cw = lteSLSCH(ueConfig,psschinfo.G,harqProcesses(harqID).data); psschSymbols = ltePSSCH(ueConfig,cw); slgrid(psschIndices) = psschSymbols; % PSSCH DRS psschdrssymbols = ltePSSCHDRS(ueConfig); psschdrsindices = ltePSSCHDRSIndices(ueConfig); slgrid(psschdrsindices) = psschdrssymbols; % The SC-FDMA modulation will not use windowing due to the % piece-wise nature of the waveform construction windowing = 0; % perform sidelink SC-FDMA modulation [txWaveform,scfdmaInfo] = lteSLSCFDMAModulate(ueConfig,slgrid,windowing); % Add 25 sample padding. This is to cover the range of delays % expected from channel modeling (a combination of % implementation delay and channel delay spread) ntxants = size(txWaveform,2); txWaveform = [txWaveform; zeros(25, ntxants)]; %#ok<AGROW> % Pass data through channel model rxNoiselessWaveform = lteFadingChannel(channel,txWaveform); % Calculate noise gain SNR = 10^((SNRIn(snrIdx))/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*ntxants*double(ofdmInfo.Nfft))*SNR); % Create AWGN noise = N0*complex(randn(size(rxNoiselessWaveform)),... randn(size(rxNoiselessWaveform))); % Add AWGN to the received time domain waveform rxWaveform = rxNoiselessWaveform + noise; % Receiver % Once every frame, on subframe 0, calculate a new % synchronization offset. An offset within the range of % delays expected from the channel modeling (a combination % of implementation delay and channel delay spread) % indicates success if (mod(subframeNo,10)==0) frameOffset = lteSLFrameOffsetPSSCH(ueConfig,rxWaveform); if (frameOffset > 25) frameOffset = lastOffset; end lastOffset = frameOffset; end rxWaveform = rxWaveform(1+frameOffset:end,:); % Perform SC-FDMA demodulation on the received data to obtain % the resource grid rxSubframe = lteSLSCFDMADemodulate(ueConfig,rxWaveform); % Perform channel estimation, extract the received PSSCH % symbols and the corresponding channel estimate, and % perform equalization [hest,nest] = lteSLChannelEstimatePSSCH(ueConfig,cec,rxSubframe); [psschRx,psschHest] = lteExtractResources(psschIndices,rxSubframe,hest); psschSymbols = lteEqualizeMMSE(psschRx,psschHest,nest); % Demodulate the PSSCH codedSlschBits = ltePSSCHDecode(ueConfig,psschSymbols); % Decode the SL-SCH, including soft combining into the % receiver buffer and check the CRC [~,slschCRC,harqProcesses(harqID).decState] = ... lteSLSCHDecode(ueConfig,TBS,codedSlschBits, ... harqProcesses(harqID).decState); % Store values needed to calculate throughput bitTput = [bitTput TBS.*(1-slschCRC)]; %#ok<AGROW> txedTrBlkSizes = [txedTrBlkSizes TBS]; %#ok<AGROW> % Update the RV sequence index for the next transmission harqProcesses(harqID).RVIdx = mod(harqProcesses(harqID).RVIdx,size(RVSeq,2))+1; end % Calculate the maximum and simulated throughput maxThroughput(snrIdx) = sum(txedTrBlkSizes); % Max possible throughput simThroughput(snrIdx) = sum(bitTput); % Simulated throughput % Display the results dynamically in the command window fprintf('\nSNR = %.2f dB. Throughput for %d Frame(s) = %.4f Mbps\n',... SNRIn(snrIdx),NFrames,1e-6*simThroughput(snrIdx)/(NFrames*10e-3)); fprintf('SNR = %.2f dB. Throughput(%%) for %d Frame(s) = %.4f %%\n',... SNRIn(snrIdx),NFrames,simThroughput(snrIdx)*100/maxThroughput(snrIdx)); end
Subframe: 0. HARQ process index: 1. Redundancy version: 0 Subframe: 4. HARQ process index: 2. Redundancy version: 0 Subframe: 8. HARQ process index: 1. Redundancy version: 2 Subframe: 12. HARQ process index: 2. Redundancy version: 2 Subframe: 16. HARQ process index: 1. Redundancy version: 0 Subframe: 20. HARQ process index: 2. Redundancy version: 0 Subframe: 24. HARQ process index: 1. Redundancy version: 2 Subframe: 28. HARQ process index: 2. Redundancy version: 2 Subframe: 32. HARQ process index: 1. Redundancy version: 0 Subframe: 36. HARQ process index: 2. Redundancy version: 0 SNR = -5.00 dB. Throughput for 4 Frame(s) = 0.1748 Mbps SNR = -5.00 dB. Throughput(%) for 4 Frame(s) = 20.0000 % Subframe: 0. HARQ process index: 1. Redundancy version: 0 Subframe: 4. HARQ process index: 2. Redundancy version: 0 Subframe: 8. HARQ process index: 1. Redundancy version: 2 Subframe: 12. HARQ process index: 2. Redundancy version: 2 Subframe: 16. HARQ process index: 1. Redundancy version: 0 Subframe: 20. HARQ process index: 2. Redundancy version: 0 Subframe: 24. HARQ process index: 1. Redundancy version: 2 Subframe: 28. HARQ process index: 2. Redundancy version: 2 Subframe: 32. HARQ process index: 1. Redundancy version: 0 Subframe: 36. HARQ process index: 2. Redundancy version: 0 SNR = 0.00 dB. Throughput for 4 Frame(s) = 0.6992 Mbps SNR = 0.00 dB. Throughput(%) for 4 Frame(s) = 80.0000 % Subframe: 0. HARQ process index: 1. Redundancy version: 0 Subframe: 4. HARQ process index: 2. Redundancy version: 0 Subframe: 8. HARQ process index: 1. Redundancy version: 2 Subframe: 12. HARQ process index: 2. Redundancy version: 2 Subframe: 16. HARQ process index: 1. Redundancy version: 0 Subframe: 20. HARQ process index: 2. Redundancy version: 0 Subframe: 24. HARQ process index: 1. Redundancy version: 2 Subframe: 28. HARQ process index: 2. Redundancy version: 2 Subframe: 32. HARQ process index: 1. Redundancy version: 0 Subframe: 36. HARQ process index: 2. Redundancy version: 0 SNR = 5.00 dB. Throughput for 4 Frame(s) = 0.8740 Mbps SNR = 5.00 dB. Throughput(%) for 4 Frame(s) = 100.0000 %
The throughput results are displayed in the MATLAB® command window after each SNR point is completed. They are also captured in output arrays simThroughput and maxThroughput. simThroughput stores the measured throughput in number of bits for each simulated SNR point. maxThroughput stores the maximum possible throughput in number of bits for each simulated SNR point.
% Plot throughput figure plot(SNRIn, simThroughput*100./maxThroughput,'*-.'); v = axis; axis([v(1) v(2) -10 110]) title('V2X Sidelink PSSCH Throughput'); xlabel('SNR (dB)'); ylabel('Throughput (%)'); grid on;
For statistically valid results, the simulation should be run for a larger number of frames. The figure below shows the throughput results when simulating 1000 frames for an extended range of SNR values.
- 3GPP TS 36.213 "Physical layer procedures"
- 3GPP TS 36.101 "User Equipment (UE) radio transmission and reception"