Main Content

NR Cell Performance Evaluation with Physical Layer Integration

This example demonstrates the integration of high fidelity 5G Toolbox™ physical layer in a 5G New Radio (NR) node. The example models a 5G NR cell consisting of a set of user equipment (UE) connected to a gNB. The NR stack on the nodes includes radio link control (RLC), medium access control (MAC), and physical (PHY) layers. The example also models channel impairments that you can customize. For faster MAC focused simulations you can switch to passthrough PHY layer or you can integrate with a custom PHY layer.

Introduction

The example considers the following operations within gNB and UEs that facilitate uplink (UL) and downlink (DL) transmissions and receptions.

The complete PUSCH or PDSCH packet is transmitted in the first symbol of its allocated symbol set. Receiver processes the packet in the symbol just after the last symbol in the allocated symbol set.

This example models:

  • Slot based and symbol based DL and UL scheduling.

  • Configurable subcarrier spacing resulting in different slot durations.

  • Noncontiguous allocation of frequency-domain resources in terms of resource block groups (RBGs).

  • Asynchronous adaptive hybrid automatic repeat request (HARQ) mechanism in UL and DL.

  • PUSCH demodulation reference signal (DM-RS) and PDSCH DM-RS.

  • DL channel quality measurement by UEs based on the CSI-RS received from gNB. By default, the CSI-RS resource element is transmitted in each slot for each resource block (RB) in DL bandwidth for all UEs. The same CSI-RS configuration is applicable to all the UEs. The example does not model the sounding reference signal (SRS) for measuring UL channel quality. UL channel quality is assumed to be the same as the DL channel quality measured on CSI-RS.

  • Free space path loss (FSPL), additive white Gaussian noise (AWGN), and clustered delay line (CDL) propagation channel model.

  • Single input single output (SISO) antenna configuration.

  • Single bandwidth part across the whole carrier.

Control packets such as UL assignment, DL assignment, buffer status report (BSR), PDSCH feedback, and channel quality indicator (CQI) report, are assumed to be sent out of band, that is, without the need of resources for transmission and assured error-free reception.

NR Protocol Stack

A node (gNB or UE) is a composition of NR stack layers. The helper classes hNRGNB.m and hNRUE.m create gNB and UE nodes respectively, containing the RLC, MAC, and PHY layers.

RLC Layer

RLC operates in unacknowledged mode (UM) with a single logical channel (LCH). For the RLC layer, both hNRGNB.m and hNRUE.m use hNRUMEntity.m to implement the functionality of both the RLC transmitter and receiver.

MAC Layer

For the MAC layer, hNRGNB.m uses the helper class hNRGNBMAC.m to implement the gNB MAC functionality and hNRUE.m uses hNRUEMAC.m to implement the UE MAC functionality. gNB MAC has UL and DL schedulers that assign UL and DL resources, respectively to the UEs. For more details about UL and DL scheduling to assign the PUSCH and the PDSCH resources, see the NR FDD Scheduling Performance Evaluation example. Schedulers are implemented in hNRSchedulerRoundRobin.m (Round robin strategy), hNRSchedulerProportionalFair.m (Proportional fair strategy), and hNRSchedulerBestCQI.m (Best CQI strategy) helper classes. All these schedulers are inherited from the base class hNRScheduler.m, which contains the core scheduling functionality.

PHY Layer and Channel Modeling

The example uses 5G Toolbox™ for PHY layer operations of UE and gNB. On the Tx side, the operations involve the physical layer processing of a transport block received from MAC and its transmission. On the Rx side, there is processing of received waveform and sending the decoded information to MAC. For more details on PDSCH and PUSCH processing chains, refer to the NR PDSCH Throughput example and NR PUSCH Throughput example, respectively. For the PHY layer, hNRGNB.m uses the helper class hNRGNBPhy.m to implement the gNB PHY layer functionality and hNRUE.m uses hNRUEPhy.m to implement the UE PHY layer functionality. For channel impairments, the example models FSPL, AWGN, and the CDL propagation channel model.

The example uses a lookup table to map the received signal to interference and noise ratio (SINR) to CQI index for 0.1 block error rate (BLER). The lookup table corresponds to the CQI table as per 3GPP TS 38.214 Table 5.2.2.1-3. For more information about the process of generating this lookup table, refer to 5G NR Downlink CSI Reporting example.

MAC-PHY Interface

Following are the major interface calls between the MAC layer and PHY layer. For more details, refer to hNRPhyInterface.m.

  • txDataRequest: The request from MAC to PHY to transmit either PDSCH (by gNB) or PUSCH (by UE). MAC calls this request at the start of Tx time. The PHY processing time is not modeled in this example.

  • rxDataRequest: The request from MAC to PHY to receive either PUSCH (by gNB) or PDSCH (by UE). MAC calls this request at the start of Rx time.

  • dlControlRequest: The request from MAC to PHY for non-data downlink transmissions or receptions. For gNB, this request is sent by gNB MAC for DL transmissions. For UE, it is sent by UE MAC for DL receptions. MAC sends the request at the start of a DL slot for all the scheduled DL transmission or receptions in the slot. This interface is used for all the DL transmission and receptions, except PDSCH. txDataRequest and rxDataRequest are used for PDSCH. In this example, gNB MAC uses this interface to send CSI-RS, and UE MAC uses it to receive CSI-RS.

  • registerMACInterfaceFcn: The one-time setup call to register MAC callback functions at PHY. PHY uses the callbacks to send information up the stack to MAC. gNB PHY uses the callback to send decoded UL packets to MAC. UE PHY uses the callbacks to send decoded DL packets and DL channel quality measured on CSI-RS to MAC.

Pluggable PHY

You can plug and use different variations of PHY layer in your system. In a simulation run, all the nodes use the same variation of the PHY layer. The MAC is unaware of the type of PHY layer underneath, because the MAC uses the MAC-PHY interface to interact with the PHY layer. By default the example uses 5G Toolbox™ to model the PHY layer. To use a passthrough PHY layer, refer to NR PUSCH FDD Scheduling, NR FDD Scheduling Performance Evaluation, and NR TDD Symbol Based Scheduling Performance Evaluation examples. A passthrough PHY layer does not do any physical layer processing of packets.

Scenario Configuration

Set the parameters for simulation.

rng('default'); % Reset the random number generator
simParameters = []; % Clear the simParameters variable
simParameters.NumFramesSim = 30; % Simulation time in terms of number of 10 ms frames
simParameters.SchedulingType = 0; % Set the value to 0 (slot based scheduling) or 1 (symbol based scheduling)

% Number of UEs in the simulation. UEs are assumed to have sequential radio
% network temporary identifiers (RNTIs) from 1 to NumUEs. If you change the
% number of UEs, ensure that the following simulation parameters are array
% of length equal to NumUEs: simParameters.UEDistance,
% simParameters.ULPacketPeriodicityUEs, simParameters.ULPacketSizesUEs,
% simParameters.DLPacketPeriodicityUEs, simParameters.DLPacketSizesUEs
simParameters.NumUEs = 4;
simParameters.UEDistance = [100; 400; 1500; 1000];

% Set the channel bandwidth to 5 MHz and subcarrier spacing (SCS) to 15
% kHz as defined in 3GPP TS 38.104 Section 5.3.2
% RB count for 5 MHz band with 15 kHz SCS. The complete
% bandwidth is assumed to be allotted for PUSCH/PDSCH
simParameters.NumRBs = 25;
simParameters.SCS = 15; % kHz
simParameters.DLCarrierFreq = 2.635e9; % Hz
simParameters.ULCarrierFreq = 2.515e9; % Hz
% The UL and DL carriers are assumed to have symmetric channel
% bandwidth
simParameters.DLBandwidth = 5e6; % Hz
simParameters.ULBandwidth = 5e6; % Hz

simParameters.UETxPower = 23; % Tx power for all the UEs in dBm
simParameters.GNBTxPower = 29; % Tx power for gNB in dBm
simParameters.GNBRxGain = 11; % Receiver antenna gain at gNB

% SINR to CQI mapping table for 0.1 BLER
simParameters.SINR90pc = [-5.46 -0.46 4.54 9.05 11.54 14.04 15.54 18.04 ...
    20.04 22.43 24.93 25.43 27.43 30.43 33.43];

simParameters.SchedulerStrategy = 'PF'; % Supported scheduling strategies: 'PF', 'RR', and 'BestCQI'
% Maximum limit on the RBs allotted for PUSCH and PDSCH
% Transmission limit is applicable for new PUSCH and PDSCH assignments and
% not for the retransmissions
simParameters.RBAllocationLimitUL = 15; % For PUSCH
simParameters.RBAllocationLimitDL = 15; % For PDSCH

% Logging and Visualization Configuration
% The parameters CQIVisualization and RBVisualization control the display
% of these visualizations: (i) CQI visualization of RBs (ii) RB assignment
% visualization. By default, the 'RBVisualization' plot is disabled. You
% can enable it by setting to 'true'
simParameters.CQIVisualization = true;
simParameters.RBVisualization = false;
% The output metrics plots are updated periodically NumMetricsSteps times within the simulation duration
simParameters.NumMetricsSteps = 20;
% MAT-files to write the logs into. They are used for post simulation analysis and visualization
simParameters.ParametersLogFile = 'simParameters'; % For logging the simulation parameters
simParameters.SimulationLogFile = 'simulationLogs'; % For logging the simulation logs

% Enable packet capture (PCAP)
simParameters.PCAPLogging = false; % Set the value to true to enable packet capture for UEofInterest
simParameters.UEofInterest = 1; % Log the packets of UE with this RNTI

% Set the periodic UL and DL application traffic pattern for UEs
simParameters.ULPacketPeriodicityUEs = [10; 20; 20; 30]; % Periodicity (in ms) at which the UL packets are generated by UEs
simParameters.ULPacketSizesUEs = [8000; 8000; 7500; 8500]; % Size of the UL packets (in bytes) generated by UEs
simParameters.DLPacketPeriodicityUEs = [10; 20; 30; 30]; % Periodicity (in ms) at which the DL packets are generated for UEs at gNB
simParameters.DLPacketSizesUEs = [10000; 9000; 7500; 7500]; % Size of the DL packets generated (in bytes) for UEs at gNB
% Validate the simulation configuration
hNRCellPerformanceWithPhysicalLayerValidateConfig(simParameters);

Derived Parameters

Based on the primary configuration parameters, compute the derived parameters. Additionally, set some example specific constants.

simParameters.DuplexMode = 0; % FDD
simParameters.NCellID = 1; % Physical cell ID
simParameters.Position = [0 0 0]; % Position of gNB in (x,y,z) coordinates
simParameters.CSIRSRowNumber = 2; % Possible row numbers for single transmit antenna case are 1 and 2
simParameters.SubbandSize = 8; % Size of sub-band for CQI reporting in terms of number of RBs
simParameters.ChannelModelType = 'CDL'; % To model CDL propagation channel
% gNB ensures that PUSCH assignment is received at UEs PUSCHPrepTime ahead
% of the transmission time
simParameters.PUSCHPrepTime = 200; % In microseconds
% Slot duration for the selected SCS and number of slots in a 10 ms frame
slotDuration = 1/(simParameters.SCS/15); % In ms
numSlotsFrame = 10/slotDuration; % Number of slots in a 10 ms frame
numSlotsSim = simParameters.NumFramesSim * numSlotsFrame; % Number of slots in the simulation

% Interval at which metrics visualization updates in terms of number of
% slots. As one slot is the finest time-granularity of the simulation, make
% sure that MetricsStepSize is an integer
simParameters.MetricsStepSize = ceil(numSlotsSim / simParameters.NumMetricsSteps);
if mod(numSlotsSim, simParameters.NumMetricsSteps) ~= 0
    % Update the NumMetricsSteps parameter if NumSlotsSim is not
    % completely divisible by it
    simParameters.NumMetricsSteps = floor(numSlotsSim / simParameters.MetricsStepSize);
end

numLogicalChannels = 1; % Only 1 logical channel is assumed in each UE in this example
% Logical channel id (logical channel ID of data radio bearers starts from 4) 
simParameters.LCHConfig.LCID = 4;

% RLC entity direction. Value 0 represents DL only, 1
% represents UL only and 2 represents both UL and DL
% direction. Setting entity direction to have both UL and DL
simParameters.RLCConfig.EntityDir = 2;

% Create RLC channel configuration structure
rlcChannelConfigStruct.LCGID = 1; % Mapping between logical channel and logical channel group ID
rlcChannelConfigStruct.Priority = 1; % Priority of each logical channel
rlcChannelConfigStruct.PBR = 8; % Prioritized bitrate (PBR), in kilobytes per second, of each logical channel
rlcChannelConfigStruct.BSD = 10; % Bucket size duration (BSD), in ms, of each logical channel
rlcChannelConfigStruct.EntityType = simParameters.RLCConfig.EntityDir;
rlcChannelConfigStruct.LogicalChannelID = simParameters.LCHConfig.LCID;

% Maximum RLC SDU length (in bytes) as per 3GPP TS 38.323
simParameters.maxRLCSDULength = 9000;

if ~isfield(simParameters, 'SchedulingType') || simParameters.SchedulingType == 0 % If no scheduling type is specified or slot based scheduling is specified
    rbAssignmentPlotPeriodicity = numSlotsFrame; % Update RB assignment visualization every frame (10 ms)
    tickGranularity = 14;
    simParameters.PUSCHMappingType = 'A';
    simParameters.PDSCHMappingType = 'A';
else % Symbol based scheduling
    rbAssignmentPlotPeriodicity = 1; % Update RB assignment visualization every slot
    tickGranularity = 1;
    simParameters.PUSCHMappingType = 'B';
    simParameters.PDSCHMappingType = 'B';
end

gNB and UEs Setup

Create the gNB and UE objects, initialize the channel quality information for UEs, and set up the logical channel at gNB and UE. The helper classes hNRGNB.m and hNRUE.m create gNB node and UE node respectively, containing the RLC, MAC and PHY layers.

gNB = hNRGNB(simParameters); % Create gNB node
% Create scheduler
switch(simParameters.SchedulerStrategy)
    case 'RR' % Round robin scheduler
        scheduler = hNRSchedulerRoundRobin(simParameters);
    case 'PF' % Proportional fair scheduler
        scheduler = hNRSchedulerProportionalFair(simParameters);
    case 'BestCQI' % Best CQI scheduler
        scheduler = hNRSchedulerBestCQI(simParameters);
end
addScheduler(gNB, scheduler); % Add scheduler to gNB

gNB.PhyEntity = hNRGNBPhy(simParameters); % Create the PHY layer instance
configurePhy(gNB, simParameters); % Configure the PHY layer
setPhyInterface(gNB); % Set the interface to PHY layer

% Create the set of UE nodes
UEs = cell(simParameters.NumUEs, 1);
for ueIdx=1:simParameters.NumUEs
    simParameters.Position = [simParameters.UEDistance(ueIdx) 0 0]; % Position of UE
    UEs{ueIdx} = hNRUE(simParameters, ueIdx);
    UEs{ueIdx}.PhyEntity = hNRUEPhy(simParameters, ueIdx); % Create the PHY layer instance
    configurePhy(UEs{ueIdx}, simParameters); % Configure the PHY layer
    setPhyInterface(UEs{ueIdx}); % Set up the interface to PHY layer

    % Setup logical channel at gNB for the UE
    configureLogicalChannel(gNB, ueIdx, rlcChannelConfigStruct);
    % Setup logical channel at UE
    configureLogicalChannel(UEs{ueIdx}, ueIdx, rlcChannelConfigStruct);

    % Add data traffic pattern generators to gNB and UE nodes
    ulPacketSize = simParameters.ULPacketSizesUEs(ueIdx);
    % Calculate the data rate (in kbps) of On-Off traffic pattern using
    % packet size (in bytes) and packet interval (in ms)
    ulDataRate = ceil(1000/simParameters.ULPacketPeriodicityUEs(ueIdx)) * ulPacketSize * 8e-3;
    % Limit the size of the generated application packet to the maximum RLC
    % SDU size. The maximum supported RLC SDU size is 9000 bytes
    if ulPacketSize > simParameters.maxRLCSDULength
        ulPacketSize = simParameters.maxRLCSDULength;
    end

    % Create an object for On-Off network traffic pattern and add it to the
    % specified UE. This object generates the uplink data traffic on the UE
    ulApp = networkTrafficOnOff('PacketSize', ulPacketSize, 'GeneratePacket', true, ...
        'OnTime', simParameters.NumFramesSim/100, 'OffTime', 0, 'DataRate', ulDataRate);
    UEs{ueIdx}.addApplication(ueIdx, simParameters.LCHConfig.LCID, ulApp);

    dlPacketSize = simParameters.DLPacketSizesUEs(ueIdx);
    dlDataRate = ceil(1000/simParameters.DLPacketPeriodicityUEs(ueIdx)) * dlPacketSize *8e-3;
    if dlPacketSize > simParameters.maxRLCSDULength
        dlPacketSize = simParameters.maxRLCSDULength;
    end

    % Create an object for On-Off network traffic pattern for the specified
    % UE and add it to the gNB. This object generates the downlink data
    % traffic on the gNB for the UE
    dlApp = networkTrafficOnOff('PacketSize', dlPacketSize, 'GeneratePacket', true, ...
        'OnTime', simParameters.NumFramesSim/100, 'OffTime', 0, 'DataRate', dlDataRate);
    gNB.addApplication(ueIdx, simParameters.LCHConfig.LCID, dlApp);
end
% Setup the UL and DL packet distribution mechanism
simParameters.MaxReceivers = simParameters.NumUEs;
% Create DL packet distribution object
dlPacketDistributionObj = hNRPacketDistribution(simParameters, 0); % 0 for DL
% Create UL packet distribution object
ulPacketDistributionObj = hNRPacketDistribution(simParameters, 1); % 1 for UL
hNRSetUpPacketDistribution(simParameters, gNB, UEs, dlPacketDistributionObj, ulPacketDistributionObj);

% Enable PCAP logging
if simParameters.PCAPLogging
    % To generate unique file name for every simulation run
    ueCapturefileName = strcat('CellID-', num2str(simParameters.NCellID), '_ue-',num2str(simParameters.UEofInterest), '_', num2str(now));
    enablePacketLogging(UEs{simParameters.UEofInterest}.PhyEntity, ueCapturefileName);
    
    % Uncomment the below code to enable packet capture at gNB
    % gnbCapturefileName = strcat('CellID-', num2str(simParameters.NCellID), '_gNB-', num2str(now));
    % enablePacketLogging(gNB.PhyEntity, gnbCapturefileName);
end

Processing Loop

Simulation is run slot by slot. In each slot, these operations are executed:

  • Run the MAC and PHY layers of gNB

  • Run the MAC and PHY layers of UEs

  • Layer-specific logging and visualization

  • Advance the timer for the nodes. Every 1 ms it also sends trigger to application and RLC layers. Application layer and RLC layer execute their scheduled operations based on 1 ms timer trigger.

% Create an object for MAC (UL & DL) scheduling information visualization and logging
simSchedulingLogger = hNRSchedulingLogger(simParameters);
% Create an object for PHY metrics logging
simPhyLogger = hNRPhyLogger(simParameters);
% Create visualization object for MAC and PHY metrics
visualizer = hNRMetricsVisualizer(simParameters, 'MACLogger', simSchedulingLogger, 'PhyLogger', simPhyLogger);

% Run processing loop
slotNum = 0;
numSymbolsSim = numSlotsSim * 14; % Simulation time in units of symbol duration
% Execute all the symbols in the simulation
for symbolNum = 1 : tickGranularity : numSymbolsSim
    if mod(symbolNum - 1, 14) == 0
        slotNum = slotNum + 1;
    end
    
    % Run MAC and PHY of gNB
    run(gNB);
    
    % Run MAC and PHY of UEs
    for ueIdx = 1:simParameters.NumUEs
        run(UEs{ueIdx});
    end
    
    % MAC logging
    logCellSchedulingStats(simSchedulingLogger, symbolNum, gNB, UEs);
    
    % PHY logging
    logCellPhyStats(simPhyLogger, symbolNum, gNB, UEs);
    
    % Visualization
    % Check slot boundary
    if symbolNum > 1 && ((simParameters.SchedulingType == 1 && mod(symbolNum, 14) == 0) || (simParameters.SchedulingType == 0 && mod(symbolNum-1, 14) == 0))
        % RB assignment visualization (if enabled)
        if simParameters.RBVisualization
            if mod(slotNum, rbAssignmentPlotPeriodicity) == 0
                % Plot at slot boundary, if the update periodicity is reached
                plotRBGrids(simSchedulingLogger);
            end
        end
        % CQI grid visualization (if enabled)
        if simParameters.CQIVisualization
            if mod(slotNum, numSlotsFrame) == 0 % Plot at frame boundary
                plotCQIRBGrids(simSchedulingLogger);
            end
        end
        % If the update periodicity is reached, plot scheduler metrics and PHY metrics visualization
        % at slot boundary
        if mod(slotNum, simParameters.MetricsStepSize) == 0
            plotMetrics(visualizer, slotNum);
        end
    end
    
    % Advance timer ticks for gNB and UEs by 14 symbols
    advanceTimer(gNB, tickGranularity);
    for ueIdx = 1:simParameters.NumUEs
        advanceTimer(UEs{ueIdx}, tickGranularity);
    end
end

Figure Channel Quality Visualization contains an axes and other objects of type uicontrol. The axes with title Channel Quality Visualization for Cell ID - 1 contains 80 objects of type rectangle.

Simulation Visualization

The five types of run-time visualization shown are:

  • Display of CQI values for UEs over the PUSCH/PDSCH bandwidth: For details, see the 'Channel Quality Visualization' figure description in NR PUSCH FDD Scheduling example.

  • Display of resource grid assignment to UEs: The 2D time-frequency grid shows the resource allocation to the UEs. You can enable this visualization in the Scenario Configuration section. For details, see the 'Resource Grid Allocation' figure description in NR PUSCH FDD Scheduling example.

  • Display of UL scheduling metrics plots: For details, see 'Uplink Scheduler Performance Metrics' figure description in NR FDD Scheduling Performance Evaluation example.

  • Display of DL scheduling metrics plots: For details, see 'Downlink Scheduler Performance Metrics ' figure description in NR FDD Scheduling Performance Evaluation example.

  • Display of DL and UL Block Error Rates: The two sub-plots displayed in 'Block Error Rate (BLER) Visualization' shows the block error rate (for each UE) observed in the uplink and downlink directions, as the simulation progresses. The plot is updated every metricsStepSize slots.

Simulation Logs

The parameters used for simulation and the simulation logs are saved in MAT-files for post simulation analysis and visualization. The simulation parameters are saved in a MAT-file with the file name as the value of configuration parameter simParameters.ParametersLogFile. The per time step logs, scheduling assignment logs, and BLER logs are saved in the MAT-file simParameters.SimulationLogFile. After the simulation, open the file to load DLTimeStepLogs, ULTimeStepLogs SchedulingAssignmentLogs, and RLCLogs in the workspace.

Time step logs: Both the DL and UL time step logs follow the same format. For details of log format, see the 'Simulation Logs' section of NR PUSCH FDD Scheduling.

Scheduling assignment logs: Information of all the scheduling assignments and related information is logged in this file. For details of log format, see the 'Simulation Logs' section of NR FDD Scheduling Performance Evaluation example.

Block Error Rate logs: Block error information observed in the uplink and downlink directions are logged in this file. This table shows the sample log entries.

Each row of the log represents one slot. The column contains the information vector of length equal to the number of UEs. Information about a UE is at an index equal to its RNTI.

At the end of the simulation, the achieved value for system performance indicators is compared to their theoretical peak values (considering zero overheads). Performance indicators displayed are achieved data rate (UL and DL), achieved spectral efficiency (UL and DL), and BLER observed for UEs (DL and UL). The peak values are calculated as per 3GPP TR 37.910.

simulationLogs = cell(1,1);
if(simParameters.DuplexMode == 0) % FDD
    logInfo = struct('DLTimeStepLogs', [], 'ULTimeStepLogs', [], 'SchedulingAssignmentLogs', [], 'BLERLogs', [], 'AvgBLERLogs', []);
else
    logInfo = struct('TimeStepLogs', [], 'SchedulingAssignmentLogs', [], 'BLERLogs', []);
end
[dlStats, ulStats] = getPerformanceIndicators(simSchedulingLogger);
[logInfo.BLERLogs, logInfo.AvgBLERLogs] = getBLERLogs(simPhyLogger); % Block Error rate logs
fprintf('Peak UL throughput: %0.2f Mbps. Achieved average UL Throughput: %0.2f Mbps', ulStats(1, 1), ulStats(2, 1));
Peak UL throughput: 31.11 Mbps. Achieved average UL Throughput: 5.70 Mbps
fprintf('\nPeak DL throughput: %0.2f Mbps. Achieved average DL Throughput: %0.2f Mbps', dlStats(1, 1), dlStats(2, 1));
Peak DL throughput: 31.11 Mbps. Achieved average DL Throughput: 5.84 Mbps
fprintf('\nAchieved average UL Goodput: %0.2f Mbps. Achieved average DL Goodput: %0.2f Mbps', ulStats(5, 1), dlStats(5, 1));
Achieved average UL Goodput: 5.65 Mbps. Achieved average DL Goodput: 5.83 Mbps
fprintf('\nPeak UL spectral efficiency: %0.2f bits/s/Hz. Achieved average UL spectral efficiency: %0.2f bits/s/Hz ', ulStats(3, 1), ulStats(4, 1));
Peak UL spectral efficiency: 6.22 bits/s/Hz. Achieved average UL spectral efficiency: 1.14 bits/s/Hz 
fprintf('\nPeak DL spectral efficiency: %0.2f bits/s/Hz. Achieved average DL spectral efficiency: %0.2f bits/s/Hz', dlStats(3, 1), dlStats(4, 1));
Peak DL spectral efficiency: 6.22 bits/s/Hz. Achieved average DL spectral efficiency: 1.17 bits/s/Hz
disp(['Block error rate for each UE in the uplink direction: [' num2str(round(logInfo.AvgBLERLogs(:, 2)', 2)) ']']);
Block error rate for each UE in the uplink direction: [0.01        0.04        0.06           0]
disp(['Block error rate for each UE in the downlink direction: [' num2str(round(logInfo.AvgBLERLogs(:, 1)', 2)) ']']);
Block error rate for each UE in the downlink direction: [0.01           0        0.01        0.01]

You can run the script NRPostSimVisualization to get a post-simulation visualization of logs. For more details about the options to run this script, refer to the NR FDD Scheduling Performance Evaluation example

% Read the logs and save them in MAT-files
if(simParameters.DuplexMode == 0) % FDD
    [logInfo.DLTimeStepLogs, logInfo.ULTimeStepLogs] = getSchedulingLogs(simSchedulingLogger);
else % TDD
    logInfo.TimeStepLogs = getSchedulingLogs(simSchedulingLogger);
end
logInfo.SchedulingAssignmentLogs = getGrantLogs(simSchedulingLogger); % Scheduling assignments log
simulationLogs{1} = logInfo;
save(simParameters.ParametersLogFile, 'simParameters'); % Save simulation parameters in a MAT-file
save(simParameters.SimulationLogFile, 'simulationLogs'); % Save simulation logs in a MAT-file

Further Exploration

You can use this example to further explore these options.

Custom scheduling

You can modify the existing scheduling strategy to implement a custom one. Refer to 'Further Exploration' section of NR FDD Scheduling Performance Evaluation example to see the steps involved.

Use passthrough physical layer

For MAC focused simulations, you can use the passthrough PHY layer by installing passthrough PHY layer object on nodes. For gNB create an object of type hNRGNBPassthroughPhy, and for UE create an object of type hNRUEPassthroughPhy. For details, see 'gNB and UEs setup' section of NR FDD Scheduling Performance Evaluation example.

Based on described simulation parameters, the example evaluates the performance of the system measured in terms of various metrics. Different visualizations show the run time performance of the system. A more thorough post simulation analysis by using the saved logs gives a detailed picture of the operations on a per slot basis.

Use RLC AM

You can also switch the operating mode of an RLC entity from UM to acknowledged mode (AM) by modifying the input structure fields EntityType and SeqNumFieldLength in the configureLogicalChannel function of hNRNode.m. For more details, see the 'Further Exploration' section of NR FDD Scheduling Performance Evaluation.

Appendix

The example uses these helper functions and classes:

References

[1] 3GPP TS 38.104. “NR; Base Station (BS) radio transmission and reception.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

[2] 3GPP TS 38.214. “NR; Physical layer procedures for data.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

[3] 3GPP TS 38.321. “NR; Medium Access Control (MAC) protocol specification.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

[4] 3GPP TS 38.322. “NR; Radio Link Control (RLC) protocol specification.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

[5] 3GPP TS 38.323. “NR; Packet Data Convergence Protocol (PDCP) specification.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

[6] 3GPP TS 38.331. “NR; Radio Resource Control (RRC) protocol specification.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

[7] 3GPP TR 37.910. “Study on self evaluation towards IMT-2020 submission.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

Related Topics